Loading...
Loading...
### Terraform Version ```shell Terraform v1.7.2 on linux_amd64 + provider registry.terraform.io/hashicorp/aws v5.35.0 ``` ### Terraform Configuration Files I am creating two AWS target groups that will be attached to an AWS autoscaling group. I create a target group and then attach to the ASG something like this: ``` target_group_arns = [ aws_lb_target_group.alb_target_group01.arn ] ``` Later I create a new target group and alter my code like this: ``` target_group_arns = [ aws_lb_target_group.alb_target_group01.arn, aws_lb_target_group.alb_target_group02.arn, ] ``` and it works fine in the first apply. However, if remove my second target group and remove it from the list above and apply, so I get back to just one target group. And then I add the target group back again and alter my list like this: ``` target_group_arns = compact([ aws_lb_target_group.alb_target_group01.arn, aws_lb_target_group.alb_target_group02.arn, ]) ``` The the first apply creates the second target group but the list does not seem to recognize a new target group is in place. I need to run a second apply. It seems the ```compact()``` function somehow makes terraform not update the list with the second target group on a first apply. ### Debug Output N/A ### Expected Behavior ```compact()``` function should work as expected. ### Actual Behavior ```compact()``` function acting strange. ### Steps to Reproduce ```terraform apply``` ### Additional Context N/A ### References N/A
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.