Skip to content

Preserve browser pool ID during updates - #113

Open
IlyaasK wants to merge 1 commit into
mainfrom
fix/preserve-browser-pool-id-in-plan
Open

Preserve browser pool ID during updates#113
IlyaasK wants to merge 1 commit into
mainfrom
fix/preserve-browser-pool-id-in-plan

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve the computed browser pool ID from state while planning in-place updates
  • add a regression test for unknown planned IDs
  • generalize the existing string plan-modifier test helper

Why

Without UseStateForUnknown, a normal browser pool update renders the stable ID and every dependent output as (known after apply), even though the resource is updated in place and retains its identity.

Verification

  • go test ./internal/resources/browserpool
  • go test -short -timeout=2m ./...
  • go vet ./...
  • git diff --check
  • production-backed read-only plan through a local provider override: changing timeout_seconds kept the existing pool ID known in the plan

Note

Low Risk
Schema-only plan-modifier change with targeted tests; no runtime API or auth behavior changes.

Overview
Fixes Terraform plan noise on in-place kernel_browser_pool updates by applying UseStateForUnknown to the computed id attribute so the stable pool ID is taken from state when the planned value is unknown, instead of showing (known after apply) for the ID and anything that references it.

Adds TestSchemaIDKeepsStateDuringUpdate to lock in that behavior (no replacement, planned ID stays pool-1 from state). Renames the schema test helper to runStringPlanModifiers and reuses it for existing project_id plan-modifier tests, with diagnostics failures surfaced in the helper.

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

@IlyaasK
IlyaasK force-pushed the fix/preserve-browser-pool-id-in-plan branch from 7ec5d9b to 53ea502 Compare August 3, 2026 18:30
@IlyaasK
IlyaasK force-pushed the fix/preserve-browser-pool-id-in-plan branch from 53ea502 to eaa40bf Compare August 3, 2026 18:38
@IlyaasK
IlyaasK requested a review from Sayan- August 3, 2026 18:38
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