-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
feat: Add support for ignoring both desired_capacity
and target_group_arns
#250
Conversation
desired_capacity
and target_group_arns
desired_capacity
and target_group_arns
what is your use case where you are attaching the target group directly to the autoscaling group? |
I forgot to add my use case in |
No no, apologies for the confusion - I was meaning, what is your implementation use case, nothing to do with the code changes. Meaning, what setup or architecture are you working towards that prompted this change |
Ahead of my comment, I hope that I fully understand your question. : ) We are in PoC about Detection of Terraform drift, in core web services. I'm checking for prerequisite.
I refer to this post(globaldatanet), but we will make it in simple process. |
I'm sorry, I still don't follow. Regardless, I don't think it makes sense to add the |
@bryantbiggs There are situations where for unknown reasons Terraform wants to remove TG from ALB.
In the next run, it will try to attach it. after that, in the next plan, it wants to remove it again... |
This sounds like a bug . is this attached directly on the autoscaling group or are you using an external attachment resource? (hint hint - use the latter) |
Attached directly to autoscaling group, copied full code from your example. |
The examples here use the external attachment method, not the direct attachment on the autoscaling group @dusansusic do you have a minimal, reproducible example? |
My bad, external attachment and it happens with your example all the time. |
Can you give more details, explain steps to reproduce? I am not seeing it when I deploy the example |
@bryantbiggs here it is:
|
|
Full working example with described issue:
|
I was able to modify the provided code - its a lot of back and forth for one issue, would be nice if folks followed the issue template so we can quickly get to the issue and then make the appropriate decisions/actions but 🤷🏽 |
I will submit an issue but it won't be different from what I already provided; profile name for configuring aws provider is something I cannot match with your aws configuration. but thank you for your help :) |
no need for a new issue - see #252 which (*I believe) will resolve the issues described here |
This issue has been resolved in version 7.3.1 🎉 |
@bryantbiggs Thanks for checking out which problem it was. :) I noticed after making my pull request, but at that time I was a little busy to solve the problem. |
@antonbabenko Thanks for supporting additional ignorance! |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
idc_itg
(ignore desired changes and target groups) as well as a new variable ignore_desired_capacity_changes_and_target_group_arns to allow users to opt into an autoscaling group that will ignoredesired_capacity
andtarget_group_arns
simultaneously.Motivation and Context
After initial launch, drift occured outside terraform. And it occured errors when applying drift(updates).
In this situation, I cannot use this state for monitoring drift detection with cron job.
I noticed that lifecycle(https://developer.hashicorp.com/terraform/tutorials/aws/aws-asg#set-lifecycle-rule) options in Hashicorp's tutorials, but this lifecyle is not supported in this module.
I want the addition of both ignoring
desired_capacity
andtarget_group_arns
simultaneously but unfortunately it cannot be parameterized. This change giving us the option to select that only ignoredesired_capacity
(#173) OR ignore bothdesired_capacity
andtarget_group_arns
.I think this feat. will resolve the issue(terraform-provider-aws#14540)
Breaking Changes
the only difference between
aws_autoscaling_group.idc[0]
andaws_autoscaling_group.idc_itg[0]
is that the second ASG now ignores bothdesired_capacity
andtarget_group_arns
changes to allow utilizing autoscaling without reverting or showing up in Terraform plans/applies.How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/idc_itg
for demonstration and validation of my changesterraform apply --auto-approve
andterraform destroy --auto-approve
with my accountexamples/*
projectsexamples/complete
terraform apply --auto-approve
andterraform destroy --auto-approve
with my accountpre-commit run -a
on my pull request