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

desired_capacity should be optional #66

Closed
ByJacob opened this issue May 4, 2021 · 1 comment · Fixed by #67
Closed

desired_capacity should be optional #66

ByJacob opened this issue May 4, 2021 · 1 comment · Fixed by #67
Labels
bug 🐛 An issue with the system

Comments

@ByJacob
Copy link
Contributor

ByJacob commented May 4, 2021

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

When the automatic scaling increases the number of instances and we execute the code from desired_capacity, the number of instances will be set according to the value of desired_capacity, ignoring the current alarm state. If we do not specify desired_capacity, it will be set to the minimum value anyway.

Expected Behavior

When the current number of instances is 2 and we execute the code without desired_capacity , 2 instances will still work.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Setup ASG with alarm
  2. Trigger allarb (now asg should have 2 insatnce)
  3. Apply changes (example change ami)
  4. See error

Screenshots

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: linux
  • Version 0.22.0

Additional Context

https://github.com/cloudposse/terraform-aws-ec2-autoscale-group/blob/master/main.tf#L141

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#desired_capacity

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#waiting-for-capacity

@ByJacob ByJacob added the bug 🐛 An issue with the system label May 4, 2021
@Nuru
Copy link
Sponsor Contributor

Nuru commented May 13, 2021

Closed by #67

@Nuru Nuru closed this as completed May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants