Skip to content
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

fix: Pass CloudWatch log group name from the service module to the container definition module #168

Merged
merged 3 commits into from
Feb 19, 2024
Merged

fix: Pass CloudWatch log group name from the service module to the container definition module #168

merged 3 commits into from
Feb 19, 2024

Conversation

ivan-sukhomlyn
Copy link
Contributor

@ivan-sukhomlyn ivan-sukhomlyn commented Feb 16, 2024

Description

Fix the passing of the custom CloudWatch log group name through the service module to the container-definition one introduced in #160.

Motivation and Context

To have the ability to pass custom CloudWatch log group name from the service module.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@bryantbiggs bryantbiggs changed the title fix: Custom CW Log Group name definition from service module fix: Pass CloudWatch log group nam from the service module to the container definition module Feb 16, 2024
@bryantbiggs
Copy link
Member

looks good - lets just update one example to both show this usage and verify its correct

@ivan-sukhomlyn ivan-sukhomlyn changed the title fix: Pass CloudWatch log group nam from the service module to the container definition module fix: Pass CloudWatch log group name from the service module to the container definition module Feb 19, 2024
@ivan-sukhomlyn
Copy link
Contributor Author

@bryantbiggs thanks! The complete example has been updated with custom CW log group name usage.


enable_cloudwatch_logging = true
create_cloudwatch_log_group = true
cloudwatch_log_group_name = "/aws/ecs/${local.name}/${local.container_name}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't get it 😅 🤷🏽

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an example with available variables 🙂
Thanks for reviewing!

For example, I want to create a CW log group with the /aws/ecs/${local.name}/service/${local.container_name} pattern and it was not possible in current implementation.
It was a possibility to create it additionally and pass through the variable, but I saw the same functionality for IAM roles and decided to make this small improvement to manage all required resources for ECS service logging inside the module.

@bryantbiggs bryantbiggs merged commit 9a7c9da into terraform-aws-modules:master Feb 19, 2024
11 checks passed
antonbabenko pushed a commit that referenced this pull request Feb 19, 2024
### [5.9.1](v5.9.0...v5.9.1) (2024-02-19)

### Bug Fixes

* Pass CloudWatch log group name from the service module to the container definition module ([#168](#168)) ([9a7c9da](9a7c9da))
@antonbabenko
Copy link
Member

This PR is included in version 5.9.1 🎉

@ivan-sukhomlyn ivan-sukhomlyn deleted the fix/cw_log_group_pass_to_service_module branch February 19, 2024 17:08
ivan-sukhomlyn added a commit to ivan-sukhomlyn/terraform-aws-ecs that referenced this pull request Feb 20, 2024
…ntainer definition module (terraform-aws-modules#168)

* fix: Custom CW Log Group name definition from service module

* example of custom CW log group name definition

* move custom CW log group name to autoscaling example
ivan-sukhomlyn pushed a commit to ivan-sukhomlyn/terraform-aws-ecs that referenced this pull request Feb 20, 2024
### [5.9.1](terraform-aws-modules/terraform-aws-ecs@v5.9.0...v5.9.1) (2024-02-19)

### Bug Fixes

* Pass CloudWatch log group name from the service module to the container definition module ([terraform-aws-modules#168](terraform-aws-modules#168)) ([9a7c9da](terraform-aws-modules@9a7c9da))
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants