Fix issue 20073 with diff suppress#17283
Fix issue 20073 with diff suppress#17283faustroxas wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @roaks3, 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. |
| // actual organization number. Since purpose_data is immutable, if the old value | ||
| // (from state) exists and is non-empty, we suppress the diff to avoid | ||
| // unnecessary replacements after import. | ||
| func TagKeyPurposeDataDiffSuppress(k, old, new string, d *schema.ResourceData) bool { |
There was a problem hiding this comment.
If I'm understanding correctly, wouldn't this also prevent someone from changing purpose_data in their config (and getting a plan to replace the tag key)?
There was a problem hiding this comment.
Ah yes that would be the case and you're right to catch it. That is not what I want to do. Do you have any recommendations on how to get around the issue?
hashicorp/terraform-provider-google#20073
There was a problem hiding this comment.
@roaks3 for more context, we are trying to import these secure tag keys. However, since purpose_data is not imported by provider, terraform is forcing replacements of the tag keys which we do not want as they are in use
Fixes Issue #20073
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.