Skip to content

Instantly share code, notes, and snippets.

@philmadden83
Created October 13, 2017 19:18
Show Gist options
  • Save philmadden83/de2c8ae36b8c4690587ad5e363a119b9 to your computer and use it in GitHub Desktop.
Save philmadden83/de2c8ae36b8c4690587ad5e363a119b9 to your computer and use it in GitHub Desktop.
Terraform unable to associate target group with multiple albs.
terraform apply --target aws_alb_listener_rule.alb-rule
aws_vpc.Vivid: Refreshing state... (ID: vpc-cd9ce4a5)
aws_security_group.public-alb: Refreshing state... (ID: sg-fcc43a8e)
aws_subnet.d_public: Refreshing state... (ID: subnet-4b0e7523)
aws_subnet.e_public: Refreshing state... (ID: subnet-32e7961a)
aws_alb_target_group.tg: Refreshing state... (ID: arn:aws:elasticloadbalancing:us-east-1:...6:targetgroup/tfs-web/d9bfbab5c1e3d220)
aws_alb_target_group.shared-tg: Refreshing state... (ID: arn:aws:elasticloadbalancing:us-east-1:...tgroup/webservices-tg/1e51254c87b8edea)
aws_alb.abl2: Refreshing state... (ID: arn:aws:elasticloadbalancing:us-east-1:...adbalancer/app/TfsWeb/92474f044f2aacc6)
aws_alb_listener.listener-alb2-default: Refreshing state... (ID: arn:aws:elasticloadbalancing:us-east-1:...sWeb/92474f044f2aacc6/862fad5f052e4c48)
aws_alb_listener_rule.alb1-rule: Creating...
action.#: "" => "1"
action.0.target_group_arn: "" => "arn:aws:elasticloadbalancing:us-east-1:311857501036:targetgroup/shared-tg/1e51254c87b8edea"
action.0.type: "" => "forward"
arn: "" => "<computed>"
condition.#: "" => "1"
condition.3468528876.field: "" => "path-pattern"
condition.3468528876.values.#: "" => "1"
condition.3468528876.values.0: "" => "/shared/*"
listener_arn: "" => "arn:aws:elasticloadbalancing:us-east-1:311857501036:listener/app/alb1/92474f044f2aacc6/862fad5f052e4c48"
priority: "" => "5"
Error applying plan:
1 error(s) occurred:
* aws_alb_listener_rule.alb1-rule: 1 error(s) occurred:
* aws_alb_listener_rule.alb-rule: Error creating ALB Listener Rule: TargetGroupAssociationLimit: Target group 'arn:aws:elasticloadbalancing:us-east-1:311857501036:targetgroup/shared-tg/1e51254c87b8edea' cannot be associated with more than one load balancer
status code: 400, request id: 9133ce14-b046-11e7-9f20-9398027896c0
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment