terraform-aws-modules/terraform-aws-alb

guidance - ECS Fargate + CodeDeploy changes in target groups

mdimarino opened this issue · 8 comments

Hello, I would like a guidance on how to proceed using this ALB module on how to handle changes made by CodeDeploy during a Blue/Green deployment for an ECS Fargate service.

Initially ECS Fargate uses 2 target groups with different weights, usually one with 100% of traffic and other with 0%. Lets call them tg-a and tg-b respectivelly. When CodeDeploy starts a new deploy for this service it creates tasks on tg-b, increases its traffic to 100% and finally removes tg-a.

This creates a configuration drift when we run terraform again, lets says to create new rules.

Is there a way in this module to ignore target group, and rule, changes made by CodeDeploy?

Thanks for your amazing work in this module!

smailc commented

I have having the same issue. Decoupling IaC from CICD must be a common use-case.

sebboh commented

+1 for this feature

I came in here looking for the same thing and found this helpful workaround posted in a similar closed issue: #219 (comment)

I created my target groups and listener outside of the module and it seems to be working. after a blue/green deploy, terraform plan does not show any changes

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

This issue was automatically closed because of stale in 10 days

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.