-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Ignore Scale Set capacity changes #930
Comments
I just discovered 'ignore_changes', a typical case of write before read. Sorry about that, I will close this issue. |
@ghtyrant Were you able to ignore just the capacity rather than the entier sku ? If so , could you please share how you did it |
@nomis4u I wasn't able to only ignore the capacity only - ignore_changes ignores the whole SKU. This kind of works for us for now, since we never change name or tier of the SKU. But since this still is a workaround, let me reopen the issue. |
Hi @ghtyrant, I'm glad that you managed to find a workaround! @nomis4u, you "should" be able to ignore the lifecycle {
ignore_changes = ["sku.#.capacity"]
} As the This is obviously not ideal so I have opened #1558 to change it to a list so |
VMSS: changed sku property from a set to list to help with #930
As #1558 has been merged and released in
|
Works for me now! Thank you! |
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! |
Terraform Version
AzureRM provider 1.1.2
Terraform v0.11.3
Affected Resource(s)
Terraform Configuration Files
Actual Behavior
When updating settings like the image id (or any other non sku related stuff) and applying, terraform will notice difference in scale set capacity if it has been scaled up/down in the meantime. It will then reset this capacity back to the number defined in the script, thus killing/creating a bunch of machines.
Expected Behavior
In our use case, we dynamically change the capacity of our scale set (not using terraform). When changing the referenced image id, we expect terraform to ignore the capacity, thus leaving our machines in the scale set alive.
This is a feature request. We want to be able to tell terraform to ignore sku.capacity completely. Simply leaving it out leads to an error (
Error: azurerm_virtual_machine_scale_set.ss: sku.0.capacity: required field is not set
).Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
terraform apply
The text was updated successfully, but these errors were encountered: