-
-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add option to ignore load_balancer
changes to ECS service
#81
feat: Add option to ignore load_balancer
changes to ECS service
#81
Conversation
load_balancer
changes to ECS serviceload_balancer
changes to ECS service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. Please update main.tf
in the root module to include the same variables.
modules/service/outputs.tf
Outdated
@@ -9,7 +9,7 @@ output "id" { | |||
|
|||
output "name" { | |||
description = "Name of the service" | |||
value = try(aws_ecs_service.this[0].name, aws_ecs_service.ignore_task_definition[0].name, null) | |||
value = try(aws_ecs_service.this[0].name, aws_ecs_service.ignore_task_definition[0].name, aws_ecs_service.ignore_task_definition_load_balancer[0].name, null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A similar change should be implemented for output id
.
docs/README.md
Outdated
- When using the above `ignore_task_definition_changes` setting, users can also elect to ignore changes to load balancers by setting `ignore_load_balancer_changes` to `true`. (Note: because of the aforementioned manner in which this psuedo-dynamic ignore change is being managed, changing this value after service creation will cause the entire service to be re-created. Change with caution!) This is intended to support the use of [Blue/Green deployment with CodeDeploy](https://docs.aws.amazon.com/AmazonECS/latest/userguide/deployment-type-bluegreen.html) which changes the the service's load balancer configuration. | ||
|
||
```hcl | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I am more inclined to add this to the So one service is static, all controlled in Terraform, the other one is dynamic for changing values |
Agree @bryantbiggs this sounds less likely for things to get out of hand in future 😂 |
we don't need to rename it at this time since that will be a breaking change. Lets just ensure its properly documented |
Hi, this feature is very important for my company's use case is there any way I can help to move this forward? |
Hey @david1437 I've been distracted changing day jobs, but I'll still need this in my new role. |
a8a123f
to
85c8f35
Compare
@antonbabenko let me know what you think |
## [5.1.0](v5.0.2...v5.1.0) (2023-06-05) ### Features * Add option to ignore `load_balancer` changes to ECS service ([#81](#81)) ([24bd1d8](24bd1d8))
This PR is included in version 5.1.0 🎉 |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Create (another 😬) instance of
aws_ecs_service
to allow users to ignoreload_balancer
changes.Motivation and Context
I understand this pattern could be never ending, and result in a module that's very difficult to maintain, but to me it feels like a fairly typical use-case to support Codedeploy with Blue/Green deployment.
I'm not sure if maybe it should be a single variable that controls this, instead of setting both
ignore_task_definition_changes
andignore_load_balancer_changes
to true?Breaking Changes
No breaking changes, default behaviour is unchanged.
How Has This Been Tested?
examples/*
projectsaws_ecs_service
are used.pre-commit run -a
on my pull request