Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/cloudflare_logpush_job: only set the value in state when it is defined #3188

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

jacobbednarz
Copy link
Member

@jacobbednarz jacobbednarz commented Mar 15, 2024

Updates the state management to only set the output_options when it is defined and avoid a permadiff showing it always being removed.

@dloebl as the implementor here, can you confirm this works on your side? preferably with real cases?

Copy link
Contributor

github-actions bot commented Mar 15, 2024

changelog detected ✅

…is defined

Updates the state management to only set the `output_options` when it is
defined and avoid a permadiff showing it always being removed
@jacobbednarz jacobbednarz force-pushed the conditionally-set-output-options branch from 80e9f2d to 37e68c7 Compare March 15, 2024 04:25
@jacobbednarz
Copy link
Member Author

acceptance tests now passing where i originally found this error

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareWorkerScript_" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareWorkerScript_Import
--- PASS: TestAccCloudflareWorkerScript_Import (13.74s)
=== RUN   TestAccCloudflareWorkerScript_MultiScriptEnt
=== PAUSE TestAccCloudflareWorkerScript_MultiScriptEnt
=== RUN   TestAccCloudflareWorkerScript_ModuleUpload
=== PAUSE TestAccCloudflareWorkerScript_ModuleUpload
=== CONT  TestAccCloudflareWorkerScript_MultiScriptEnt
--- PASS: TestAccCloudflareWorkerScript_MultiScriptEnt (44.18s)
=== CONT  TestAccCloudflareWorkerScript_ModuleUpload
--- PASS: TestAccCloudflareWorkerScript_ModuleUpload (19.72s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	78.778s

Copy link
Contributor

@dloebl dloebl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jacobbednarz! Good catch.
It works as expected on my side now.

Before (output_options not present):
$ terraform plan
before_cf_state

Now (output_options not present):
$ terraform plan
now_cf_state

@jacobbednarz jacobbednarz merged commit 1fc722f into master Mar 15, 2024
9 checks passed
@jacobbednarz jacobbednarz deleted the conditionally-set-output-options branch March 15, 2024 19:31
@github-actions github-actions bot added this to the v4.27.0 milestone Mar 15, 2024
github-actions bot pushed a commit that referenced this pull request Mar 15, 2024
Copy link
Contributor

This functionality has been released in v4.27.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants