Skip to content

SecretManager Secret: Prevent recreation for "automatic" to "auto"#9030

Merged
c2thorn merged 2 commits into
GoogleCloudPlatform:mainfrom
c2thorn:secret-manager-upgrade-fix
Sep 20, 2023
Merged

SecretManager Secret: Prevent recreation for "automatic" to "auto"#9030
c2thorn merged 2 commits into
GoogleCloudPlatform:mainfrom
c2thorn:secret-manager-upgrade-fix

Conversation

@c2thorn

@c2thorn c2thorn commented Sep 20, 2023

Copy link
Copy Markdown
Member

fixes hashicorp/terraform-provider-google#15885

Creates a custom diff that prevents immutability when following upgrade guide steps for replication.auto
Things to note:

  • Does not prevent the reverse: removing "auto" and adding "automatic"
  • Updating to an empty auto {} still calls the API with a trivial PATCH request.

Tested manually with local provider.

Release Note Template for Downstream PRs (will be copied)

secretmanager: fixed an issue in `google_secretmanager_secret` where replacing `replication.automatic` with `replication.auto` would destroy and recreate the resource

@modular-magician

Copy link
Copy Markdown
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.

Terraform GA: Diff ( 1 file changed, 32 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 1 file changed, 32 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 29 insertions(+))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 3075
Passed tests 2772
Skipped tests: 299
Affected tests: 4

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccSecretManagerSecret_automaticCmekUpdate

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]
TestAccSecretManagerSecret_automaticCmekUpdate[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@c2thorn c2thorn requested review from SarahFrench, rileykarson and shuyama1 and removed request for SarahFrench September 20, 2023 20:59
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.

Changing from the deprecated secret replication syntax to the new replication syntax forces replacement of the secret

3 participants