Closed mohsinzaheer25 closed 1 year ago
Add a variable to accept ignore changes option.
This is not possible to do in Terraform. We can't use variables there, so we can't satisfy this in the module. Unfortunately.
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.
Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform?
Is your request related to a problem? Please describe.
I have custom list for which i have to use aws_autoscaling_attachment terraform resource and terraform-aws-autoscaling module but module is not ignoring load_balancer and target_group_arns due to which it is always deleting the target_groups which are attached.
Describe the solution you'd like.
Add a variable to accept ignore changes option. Below is the solution that can be added to module to ignore changes and reference link
lifecycle { ignore_changes = [load_balancers, target_group_arns] }
Reference: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_attachment
Describe alternatives you've considered.
No easy alternative solution if I use module as it will try to recreate ASG and will fail.
Additional context
Reference for solution.
Reference: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_attachment