-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Handle location tag bindings of removed resources #11857
Handle location tag bindings of removed resources #11857
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @ScottSuarez, 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. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 10 Click here to see the affected service packages
View the build log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I tested the fix locally and the resource google_tags_location_tag_binding
is removed from the Terraform state when its parent is deleted outside of Terraform
Currently, the
google_tags_location_tag_binding
resource will cause any plans to fail whenever the resource (parent
) it was for is deleted outside of Terraform. Specifically, it results in errors like these during the read operation:The correct Terraform behavior would be that it recognizes this resource has been removed and drops it from the state. This PR implements that behavior, allowing plan operations to succeed even when the related resource was removed externally.
I tested the change successfully against my own test files, as well as the reproduction snippet from the linked issue.
Fixes hashicorp/terraform-provider-google#15928.
Release Note Template for Downstream PRs (will be copied)