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

compute: forced recreation of google_compute_security_policy on type updates #12233

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Nov 2, 2024

Updating the type of google_compute_security_policy (e.g., from CLOUD_ARMOR to CLOUD_ARMOR_EDGE) requires the resource to be recreated.

Fixes hashicorp/terraform-provider-google#20071

Without the change (and without the plancheck), verified that this test fails.

    resource_compute_security_policy_test.go:43: Step 3/4 error: Check failed: Check 1/1 error: google_compute_security_policy.policy: Attribute 'type' expected "CLOUD_ARMOR_EDGE", got "CLOUD_ARMOR"
--- FAIL: TestAccComputeSecurityPolicy_basicUpdate (41.37s)

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

compute: fixed permadiff on attempted `type` field updates in `google_computer_security_policy`, updating this field will now force recreation of the resource

@github-actions github-actions bot requested a review from NickElliot November 2, 2024 02:24
Copy link

github-actions bot commented Nov 2, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Nov 2, 2024
@wyardley wyardley changed the title compute: forced recreate on google_compute_security_policy type change compute: forced recreation of google_compute_security_policy on type updates Nov 2, 2024
…olicy`

Updating the `type` of `google_compute_security_policy` (e.g., from
`CLOUD_ARMOR` to `CLOUD_ARMOR_EDGE`) requires the resource to be
recreated.

Fixes hashicorp/terraform-provider-google#20071
Copy link

github-actions bot commented Nov 6, 2024

@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

github-actions bot commented Nov 8, 2024

@GoogleCloudPlatform/terraform-team @NickElliot This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician added service/compute-security-policy and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Nov 12, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 50 insertions(+), 7 deletions(-))
google-beta provider: Diff ( 2 files changed, 50 insertions(+), 7 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1060
Passed tests: 985
Skipped tests: 73
Affected tests: 2

Click here to see the affected service packages
  • compute

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeFirewallPolicyAssociation_basic
  • TestAccComputeSecurityPolicy_basicUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeFirewallPolicyAssociation_basic [Debug log]
TestAccComputeSecurityPolicy_basicUpdate [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

LGTM!

@NickElliot NickElliot merged commit acda2f0 into GoogleCloudPlatform:main Nov 12, 2024
13 checks passed
@wyardley wyardley deleted the wyardley/issues_20071/cloudarmor_recreate_policy branch November 12, 2024 23:43
Gridasov pushed a commit to Gridasov/magic-modules that referenced this pull request Nov 13, 2024
akshat-jindal-nit pushed a commit to akshat-jindal-nit/magic-modules that referenced this pull request Nov 18, 2024
zeleena pushed a commit to zeleena/magic-modules that referenced this pull request Nov 18, 2024
amanMahendroo pushed a commit to amanMahendroo/magic-modules that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chhanging type in google_compute_security_policy does not cause the resource to be recreated
3 participants