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

feat: Allowing Custom CloudWatch Log Group Name or Prefix #13

Merged

Conversation

vara-bonthu
Copy link
Contributor

@vara-bonthu vara-bonthu commented Jul 21, 2023

Description

This PR enhances the AWS CloudWatch log group for EMR Virtual cluster resource by introducing the ability for users to provide their own custom CW log group name or prefix. This change aims to offer more flexibility and control to users when creating CloudWatch log groups.

Changes Made:

In this PR, we have introduced several new variables to enhance the AWS CloudWatch log group resource, providing users with increased customization and control options. The cloudwatch_log_group_name variable enables users to specify their own custom CloudWatch log group name, with the option to fall back to a default name if left empty. The cloudwatch_log_group_use_name_prefix variable allows users to specify whether they want to use a custom prefix for the log group name, with a default value of true to maintain compatibility with existing configurations.

Motivation and Context

The current deployment process faces a limitation as it prevents the successful deployment of multiple EKS clusters using the EMR module. The issue arises due to the encountered error message:

# │ Error: creating CloudWatch Logs Log Group (/emr-on-eks-logs/emr-workload/emr-data-team-b): ResourceAlreadyExistsException: The specified log group already exists
#
# │   with module.emr_containers["data-team-b"].aws_cloudwatch_log_group.this[0],
# │   on .terraform/modules/emr_containers/modules/virtual-cluster/main.tf line 263, in resource "aws_cloudwatch_log_group" "this":
# │  263: resource "aws_cloudwatch_log_group" "this" {
#

Breaking Changes

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

modules/virtual-cluster/main.tf Outdated Show resolved Hide resolved
modules/virtual-cluster/main.tf Outdated Show resolved Hide resolved
modules/virtual-cluster/main.tf Outdated Show resolved Hide resolved
modules/virtual-cluster/variables.tf Outdated Show resolved Hide resolved
modules/virtual-cluster/variables.tf Outdated Show resolved Hide resolved
modules/virtual-cluster/variables.tf Outdated Show resolved Hide resolved
modules/virtual-cluster/variables.tf Outdated Show resolved Hide resolved
modules/virtual-cluster/variables.tf Outdated Show resolved Hide resolved
modules/virtual-cluster/variables.tf Outdated Show resolved Hide resolved
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

awesome, thank you!

@bryantbiggs bryantbiggs merged commit 1be0b5e into terraform-aws-modules:master Jul 21, 2023
14 checks passed
antonbabenko pushed a commit that referenced this pull request Jul 21, 2023
## [1.2.0](v1.1.3...v1.2.0) (2023-07-21)

### Features

* Allowing Custom CloudWatch Log Group Name or Prefix ([#13](#13)) ([1be0b5e](1be0b5e))
@antonbabenko
Copy link
Member

This PR is included in version 1.2.0 🎉

@vara-bonthu vara-bonthu deleted the emr-eks-cwloggroup branch July 21, 2023 17:03
@github-actions
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 Aug 21, 2023
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