azurerm_linux_virtual_machine_scale_set with publicIPPrefix lost during scale event #8758
Labels
bug
service/vmss
Virtual Machine Scale Sets
upstream/microsoft/blocking-swagger-issue
This label is applicable when waiting on Microsoft for an issue with the Swagger definition.
v/2.x (legacy)
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_linux_virtual_machine_scale_set
Terraform Configuration Files
Debug Output
I believe the below is the cause of problem:
Panic Output
No panic output, Terraform exists with code 0.
Expected Behavior
Apply the above Terraform to create example VMSS scale set.
Initial instances have IPs from Public IP Prefix
Increase scale set through Terraform from 2 to 3 instances.
Apply the updated Terraform manifest increasing instance count.
New instances should have IPs within the defined Public IP Prefix.
Actual Behavior
Initial created instances when applying first time have IPs from Public IP Prefix.
VMSS has configuration for Public IP Prefix - confirmed within Azure Resource Explorer (https://resources.azure.com/)
After applying for second time increasing instance count, new instances contain generally available public IPs not from Public IP Prefix.
VMSS configuration for Public IP Prefix has been removed by Terraform - confirmed within Azure Resource Explorer.
Next attempt to apply this Terraform plan will cause Terraform to attempt a destroy and re-create.
Steps to Reproduce
terraform init
terraform apply -var "instances=2"
terraform apply -var "instances=3"
Important Factoids
Not region or tenant specific.
The text was updated successfully, but these errors were encountered: