terraform-aws-modules/terraform-aws-ecs

Unable to use cloudwatch group in several environments.

Closed this issue · 6 comments

name = "/aws/ecs/${var.service}/${var.name}"

Since the service name could be the same across environments, it can cause conflicts when a CloudWatch group already exists while applying to another environment.

If I add the option to logDriver: awslogs-create-group = true, then I can't specify the retention size.

The only way to achieve this is to create a CloudWatch group outside of this module.
It would be great if the module could support a variable override for the CloudWatch group name.

Since the service name could be the same across environments, it can cause conflicts when a CloudWatch group already exists while applying to another environment.

What does this mean?

I have two clusters: 'stage' and 'prod.' Both of them have an 'api' service, and the service name is the same in both the stage and prod clusters.

Cloudwatch group created by module will have attempt to create cloudwatch group with the same.

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

Remove stale

This issue has been resolved in version 5.3.0 🎉

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.