Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform detected the following changes when I run terraform plan
# azurerm_linux_virtual_machine_scale_set.vmss-nva must be replaced
-/+ resource "azurerm_linux_virtual_machine_scale_set" "vmss-nva" {
name = "vmss-nva"
~ platform_fault_domain_count = 1 -> (known after apply)
- tags = {} -> null
+ upgrade_mode = "Manual" # forces replacement
# (19 unchanged attributes hidden)
Actual Behaviour
Always replaced with a destroy / create
Steps to Reproduce
Create a Virtual Machine Scale set manually.
Import it with Terraform.
Retrieve the state in a tf file with terraform show -no-color > vmss.tf`` Run aterraform plan`
I think there is a problem with default optional values.
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and AzureRM Provider) Version
terraform 1.0.7 azurerm v2.81.0
Affected Resource(s)
azurerm_linux_virtual_machine_scale_set
Terraform Configuration Files
Debug Output
Terraform always detect changes on
upgrade_mode
.I have created manually this Virtual Machine Scale Set inthe Azure portal and imported it in Terraform. The state defines
"upgrade_mode": null
while theazurerm_linux_virtual_machine_scale_set
resource defaults the value for this field to"Manual"
(https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine_scale_set#upgrade_mode)Terraform detected the following changes when I run
terraform plan
Actual Behaviour
Always replaced with a destroy / create
Steps to Reproduce
Create a Virtual Machine Scale set manually. Import it with Terraform. Retrieve the state in a
tf
file withterraform show -no-color > vmss.tf`` Run a
terraform plan`I think there is a problem with default optional values.