terraform-aws-alb icon indicating copy to clipboard operation
terraform-aws-alb copied to clipboard

guidance - ECS Fargate + CodeDeploy changes in target groups

Open mdimarino opened this issue 1 year ago β€’ 5 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!

mdimarino avatar Nov 08 '23 13:11 mdimarino

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

smailc avatar Dec 04 '23 11:12 smailc

+1 for this feature

I came in here looking for the same thing and found this helpful workaround posted in a similar closed issue: https://github.com/terraform-aws-modules/terraform-aws-alb/issues/219#issuecomment-1229595014

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

sebboh avatar Dec 19 '23 01:12 sebboh

please open an issue here https://github.com/aws-ia/ecs-blueprints

bryantbiggs avatar Dec 19 '23 01:12 bryantbiggs

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

github-actions[bot] avatar Jan 19 '24 00:01 github-actions[bot]

+1

siourdas-vasilis avatar Jan 23 '24 12:01 siourdas-vasilis

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

github-actions[bot] avatar Mar 09 '24 00:03 github-actions[bot]

This issue was automatically closed because of stale in 10 days

github-actions[bot] avatar Mar 19 '24 00:03 github-actions[bot]

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.

github-actions[bot] avatar Apr 18 '24 02:04 github-actions[bot]