Skip to content

Expose browser pool profile refresh state - #112

Open
IlyaasK wants to merge 2 commits into
hypeship/browser-pool-refresh-on-profile-update-resourcefrom
hypeship/browser-pool-refresh-on-profile-update-data-source
Open

Expose browser pool profile refresh state#112
IlyaasK wants to merge 2 commits into
hypeship/browser-pool-refresh-on-profile-update-resourcefrom
hypeship/browser-pool-refresh-on-profile-update-data-source

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expose refresh_on_profile_update as computed durable state on the kernel_browser_pool data source
  • flatten the Kernel SDK response with the existing strict optional-boolean handling
  • preserve known false, return null when omitted, and diagnose malformed API values
  • assert the field for both ID and exact-name lookups in the existing acceptance fixture
  • regenerate the data-source documentation

Why

Browser pools created outside Terraform should expose the same durable profile-refresh policy that the managed resource supports. This keeps read-only lookup behavior consistent with the Kernel API, SDK, and CLI.

Intentionally unsupported

This does not add runtime pool counters, leases, acquire/release/flush operations, force deletion, or any profile mutation behavior.

Verification

  • gofmt -l cmd internal
  • go test -short -timeout=2m ./...
  • go vet ./...
  • terraform fmt -check -recursive examples
  • bash scripts/check-docs.sh
  • bash scripts/check-markdown-links.sh
  • focused tests cover true, known false, omitted, null, non-boolean, Terraform state shape, and both acceptance selectors

The guarded live acceptance matrix passed: https://github.com/kernel/terraform-provider-kernel/actions/runs/30667323827. All seven jobs passed, including browser-pool create/read/update/import/delete and browser-pool data-source lookup by ID and name.


Note

Low Risk
Read-only data source and documentation changes only; no write paths or auth changes.

Overview
Adds computed read-only refresh_on_profile_update to the kernel_browser_pool data source so lookups return the same durable profile-refresh policy as the managed resource.

The value is flattened from browser_pool_config with the existing optional-boolean rules: null when the API omits the field, a known true/false when present, and diagnostics for null or non-boolean API values. Docs are regenerated; unit and acceptance tests cover schema, flatten behavior, and ID/name lookups.

Reviewed by Cursor Bugbot for commit bed2926. Bugbot is set up for automated code reviews on this repo. Configure here.

IlyaasK added 2 commits July 31, 2026 17:37
Return refresh_on_profile_update from kernel_browser_pool lookups so imported and externally managed pools expose the same durable policy as the resource. Validate API response types and cover ID/name acceptance state.
Assert the data source exposes refresh_on_profile_update as a computed-only bool so schema drift is caught by unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant