-
Notifications
You must be signed in to change notification settings - Fork 4.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
changes to custom data should force new resource #211
Conversation
@tombuildsstuff Let me know if this seems unreasonable, however it seems any change to the custom-data should forceNew. |
Hi @josmo, How could you get the current customData from virtual machine? I wasn't able to retrieve this information using the API thought https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-get |
Hi @josmo, never mind. Just realize terraform refresh is able to retrieve the info. Thanks! |
@thiagocaiubi cool :) |
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.
Hey @josmo
Thanks for this PR - I've taken a look and can confirm this issue:
compute.VirtualMachinesClient#CreateOrUpdate: Failure responding to request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status=409 Code="PropertyChangeNotAllowed" Message="Changing property 'customData' is not allowed."
We're currently using version 2016-04-30-preview
of the Compute API which doesn't allow updating the CustomData
field - however there's an issue open to update to a newer API version (later than 2016-08-30
which supports updating the CustomData
field.
Once the Swagger / SDK exists for this we'll investigate this (and presumably revert this change) - but for the moment this change LGTM :)
Thanks!
Actually, investigating this further it appears this value is missing from Hash - which is why changes aren't being picked up. I've posted more details in #148 - however this needs some larger changes (i.e. switching from a Set to a List, and a State Migration) to fix that. As such this change doesn't fix the issue where changes to (edit: sorry, posted before finishing writing!) |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Fixes #148custom-data changes should force a new resource creation.