terraform-aws-modules / terraform-aws-autoscaling

Terraform module to create AWS Auto Scaling resources πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/autoscaling/aws
Apache License 2.0
292 stars 556 forks source link

Unable to ignore change capacity on autoscaling_group resource #154

Closed ynuyasha closed 3 years ago

ynuyasha commented 3 years ago

Is your request related to a problem? Please describe.

We have Autoscaling groups that change capacity with cloudwatch triggers, so every time terraform plan find changes. Now it's impossible to modify this behaviour because lifecycle is embedded inside module

Describe the solution you'd like.

Inject lifecycle on autoscaling resource so we can add ignore_changes like this ignore_changes = ["desired_capacity"]

bryantbiggs commented 3 years ago

if you update your ASGs to use desired_capacity = null this should do the trick. unfortunately we cannot parameterize the lifecycle values and this change would cause disruption for users. its been a long requested feature from Terraform so πŸ™πŸΌ hopefully it comes one day soon

mkozjak commented 2 years ago

@bryantbiggs doesn't work if you also use min_size and max_size. At least not for me. You can't set those to null.

github-actions[bot] commented 1 year ago

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.