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

Ignore changes to desired_capacity for aws_autoscaling_group #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

afairb
Copy link

@afairb afairb commented Apr 17, 2019

The desired capacity of an autoscaling group can be changed externally due to autoscaling rules. This means that this Terraform resource should not try and change/overwrite this value when updating, as this could result in the number of instances being reduced below what is currently required.

From the Terraform docs:

By default, Terraform detects any difference in the current settings of a real infrastructure object and plans to update the remote object to match configuration.

In some rare cases, settings of a remote object are modified by processes outside of Terraform, which Terraform would then attempt to "fix" on the next run. In order to make Terraform share management responsibilities of a single object with a separate process, the ignore_changes meta-argument specifies resource attributes that Terraform should ignore when planning updates to the associated remote object.

The arguments corresponding to the given attribute names are considered when planning a create operation, but are ignored when planning an update.

https://www.terraform.io/docs/configuration/resources.html#ignore_changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant