-
Notifications
You must be signed in to change notification settings - Fork 9.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
aws_elb TF resource tries to remove ASG attached EC2 instances #2508
Comments
Possibly relates to #1552 in terms of workflow. Is this a bug? Or am I doing something wrong? Thanks :) |
Hi @CpuID - it's pretty simple actually - by explicitly specifying |
Awesome, thanks will do :) |
Interestingly, if you mix both, you still face this bug. Like in my case, I have the same example as the OP, with the only difference that my ELB definition does include an instance, as a non-ASG derived member instance. And that's by design. I want my ELB to route traffic to that single special instance as well as to the ASG instances. The result I am seeing is identical to the original bug report. Running successful terraform apply removes the instances associated from the ASG, leaving only my initial special instance in the ELB. |
@gozer i'm not sure the AWS API makes it easy to model that use case - is it possible for you to refactor such that your "special instance" lives in a second ASG with a min/max/desired of 1/1/1 and that same ELB attached? then autoscaling will populate the instances into the load balancer for 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 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. |
Currently using the following logic in my .tf file (a few names changed to generic names below):
Seeing this when running "terraform plan", after updating the AMI ID on the Launch Configuration:
This causes the ELB to remove active instances, as opposed to leaving them online pending termination/replacement.
The text was updated successfully, but these errors were encountered: