Expose browser pool profile refresh state - #112
Open
IlyaasK wants to merge 2 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
refresh_on_profile_updateas computed durable state on thekernel_browser_pooldata sourcefalse, return null when omitted, and diagnose malformed API valuesWhy
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 internalgo test -short -timeout=2m ./...go vet ./...terraform fmt -check -recursive examplesbash scripts/check-docs.shbash scripts/check-markdown-links.shThe 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_updateto thekernel_browser_pooldata source so lookups return the same durable profile-refresh policy as the managed resource.The value is flattened from
browser_pool_configwith 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.