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

Changing osDisk.Name is not allowed #5689

Closed
wants to merge 2 commits into from
Closed

Conversation

Bowbaq
Copy link
Contributor

@Bowbaq Bowbaq commented Feb 11, 2020

Error: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="PropertyChangeNotAllowed" Message="Changing property 'osDisk.name' is not allowed." Target="osDisk.name"

```
Error: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="PropertyChangeNotAllowed" Message="Changing property 'osDisk.name' is not allowed." Target="osDisk.name"
```
@ghost ghost added the size/XS label Feb 11, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Bowbaq. I've just confirmed this and the change looks good but we'll want to update the documentation as well to say that changing this forces a new resource to be created. https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/virtual_machine.html.markdown

@ghost ghost added the documentation label Feb 12, 2020
@Bowbaq Bowbaq requested a review from mbfrahry February 12, 2020 03:35
@tombuildsstuff
Copy link
Contributor

hi @Bowbaq

Thanks for opening this PR.

The azurerm_virtual_machine and azurerm_virtual_machine_scale_set resources are being superseded in 2.0 - and as such are in a feature-frozen state to ensure their behaviour remains the same. From memory this field has changed from not ForceNew to not and back a couple of times due to differences in behaviour between Managed and Unmanaged Disks.

The replacement resources (in this instance azurerm_linux_virtual_machine and azurerm_windows_virtual_machine) are now available in an opt-in Beta from 1.43 of the Azure Provider and will be going GA in the upcoming 2.0 release.

As such whilst I'd like to thank you for this contribution - since this resource is in a feature-frozen state (to ensure compatibility) I'm going to close this PR for the moment - however this is fixed in the superseded resources (since they only support Managed Disks.

Thanks!

@Bowbaq
Copy link
Contributor Author

Bowbaq commented Feb 12, 2020

Is there a timeline on 2.0? As best I can tell, it has been WIP for well over a year. In the meantime, it sounds like I'm stuck with either a buggy 1.x or a beta / not ready for production 2.0. Unfortunately, this is far from the only resource we use that is buggy in 1.x, others include azurerm_kubernetes_cluster, azurerm_subnet, azurerm_key_vault ...

@tombuildsstuff
Copy link
Contributor

@Bowbaq keep an eye on the milestones page but very soon.

Whilst these new resources are in an opt-in Beta (to allow for Schema changes if necessary) we've not needed/planned any changes to them besides a few bug fixes coming in 1.44 - as such they should be what's going live in 2.0 in the near future.

@Bowbaq
Copy link
Contributor Author

Bowbaq commented Feb 13, 2020

I'm having trouble believing the milestone page, seeing as #2807 was opened over a year ago, and the 2.0.0 milestone shows 47% done, yet is due in 8 days.

@ghost
Copy link

ghost commented Mar 28, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants