-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Don't recreate GCE instances when updating resource_policies property #10029
Don't recreate GCE instances when updating resource_policies property #10029
Conversation
Friendly ping @edwardmedia. I appreciate that you assigned #9981 to me, but unfortunately I can't approve my own PR 😃 |
This looks good to me, I will run the tests. |
Looks like the test is failing on an unrelated file. Do you want me to rebase the branch with the current master? |
Hm, yeah, the linter is failing ... but that can't realistically be your fault, can it? Let's move to the next step. :) This code is automatically generated by a tool called Magic Modules, which keeps this code in sync across ga, beta, and other occasional early access Terraform providers. Fortunately, this file is pretty easy to edit in Magic Modules - it's here: You'll notice that it uses some |
I have created a new PR for Magic Modules: GoogleCloudPlatform/magic-modules#5206 |
Closing this, because this was merged into Magic Modules. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
This should fix the behaviour described in #9981.
Basically, the change removes the ForceNew attribute from the resource_policies property of google_compute_instance and adds code to check for changes of the property. If the property changed, all old values get removed and all new values (if there are any) get added.