Open leslie-alldridge opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
@leslie-alldridge Any update on this issue. I have 20 plus ECS services and I use code deploy with blue green to update service but no clue, why sometime it showing Target group ARN change to null.
@leslie-alldridge I found that whole forward object get added by codedeploy and it's not in terraform so If I add below lifecycle rules, then it works. Would it be valid way?
lifecycle { ignore_changes = [ default_action[0].target_group_arn, default_action[0].forward ] }
Yes that's what I used as well
Terraform Core Version
1.3.5
AWS Provider Version
4.40.0
Affected Resource(s)
lb_listener_rule
Expected Behavior
We don't define any forward rules as they're Optional
Actual Behavior
We see Terraform has saved forward rules in the statefile and fails to clear them out safely on the next plan + apply.
We contacted AWS Support and they confirmed CodeDeploy has changed as of about a week ago.
Relevant Error/Panic Output Snippet
Error:
resource "aws_lb_listener" "ssl" { load_balancer_arn = aws_lb.web.arn port = var.listener_port_ssl_test protocol = "HTTPS" certificate_arn = data.terraform_remote_state.acm.outputs ssl_policy = var.listener_ssl_policy
default_action { target_group_arn = var.target_group_arn type = "forward" }
lifecycle { ignore_changes = [default_action.0.target_group_arn] } }