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

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

Comments

@philip-harvey
Copy link

philip-harvey commented Sep 18, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

terraform version 1.5.2
Google provider version 4.83

Affected Resource(s)

google_secret_manager_secret

Terraform Configuration Files

resource "google_secret_manager_secret" "secret-basic" {
  secret_id = "secret"
  replication {
    automatic = true
  }
}

Expected Behavior

No changes, should be equivalent

Actual Behavior

Every secret will be destroyed and recreated.

replication {
- automatic = true -> null # forces replacement

      + auto { # forces replacement
        }
    }

Steps to Reproduce

  1. terraform apply
  2. change replication {
    automatic = true
    }
    to
    replication {
    auto {}
    }
  3. terraform apply

Important Factoids

caused by #15793

b/301066246

@github-actions github-actions bot added forward/review In review; remove label to forward service/secretmanager labels Sep 18, 2023
@philip-harvey philip-harvey changed the title Changing from the deprecated replication syntax to the new replication syntax forces replacement Changing from the deprecated secret replication syntax to the new replication syntax forces replacement of the secret Sep 18, 2023
@edwardmedia edwardmedia removed the forward/review In review; remove label to forward label Sep 18, 2023
@rileykarson
Copy link
Collaborator

@c2thorn assigning as a 5.0.0 upgrade related issue, in case you have a plan for how to track these already

@c2thorn
Copy link
Collaborator

c2thorn commented Sep 20, 2023

Created GoogleCloudPlatform/magic-modules#9030 to prevent force replacement when replacing replication.automatic with replication.auto.
Targeting the 4.84 release.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.