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

[Feature Request] Add Plan RequiresReplaceIf Modifiers to mitigate the chance that a case change causes an error #149

Open
jlacefie opened this issue Oct 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@jlacefie
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

Currently, if a user changes case for any of the following fields, TF recognizes the change as a diff in state and attempts to update the resource. This results in an error rpc error: code = InvalidArgument desc = nothing to change.

Terraform provides the ability to modify the Plan stage to ignore case changes using RequiresReplaceIf

List of fields susceptible to this issue:

  • User Resource (AccountAccess, Permission)
  • Service_Account Resource (AccountAccess, Permission)
  • Search_Attribute Resource (Type)

Describe the solution you'd like

Use a RequiresReplaceIf plan modifier for these fields so TF ignores case changes and does not attempt to call an update with an unmodified change.

Additional context

To reproduce the issue that triggered this feature request, use terraform to run the following .tf excerpt twice, switching the comment to change case

resource "temporalcloud_user" "developer" {
  email = "[email protected]"
  # account_access = "Developer"
  # changing to lower case fails with rpc error: code = InvalidArgument desc = nothing to change
  account_access = "developer"
}

@jlacefie jlacefie added the enhancement New feature or request label Oct 22, 2024
@jlacefie jlacefie added the bug Something isn't working label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants