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: Support cloudwatch_log_group_tags parameter #571

Merged

Conversation

take-five
Copy link
Contributor

Description

Add support for configuring tags for CloudWatch log groups only via cloudwatch_log_group_tags variable.

Motivation and Context

Similar to db_parameter_group_tags, sometimes it is necessary to configure additional tags on CloudWatch log groups only. For example, in our organization we want to mark CloudWatch log groups with RDS logs as sensitive via a tag, but we don't want to apply this tag to all resources created by this module.

Breaking Changes

No

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 ran terraform plan from "examples/complete-postgres" folder and checked that aws_cloudwatch_log_group resources include a custom tag:

  # module.db.module.db_instance.aws_cloudwatch_log_group.this["postgresql"] will be created
  + resource "aws_cloudwatch_log_group" "this" {
      + arn               = (known after apply)
      + id                = (known after apply)
      + log_group_class   = (known after apply)
      + name              = "/aws/rds/instance/complete-postgresql/postgresql"
      + name_prefix       = (known after apply)
      + retention_in_days = 7
      + skip_destroy      = false
      + tags              = {
          + "Example"    = "complete-postgresql"
          + "Name"       = "complete-postgresql"
          + "Repository" = "https://github.com/terraform-aws-modules/terraform-aws-rds"
          + "Sensitive"  = "high"
        }
      + tags_all          = {
          + "Example"    = "complete-postgresql"
          + "Name"       = "complete-postgresql"
          + "Repository" = "https://github.com/terraform-aws-modules/terraform-aws-rds"
          + "Sensitive"  = "high"
        }
    }
  • I have executed pre-commit run -a on my pull request

@take-five take-five force-pushed the cloudwatch-log-groups-tags branch from 89f173e to 0abbc01 Compare October 14, 2024 08:37
Similar to `db_parameter_group_tags`, sometimes it is necessary to
configure additional tags on CloudWatch log groups only.
@take-five take-five force-pushed the cloudwatch-log-groups-tags branch from 0abbc01 to a2f9930 Compare October 16, 2024 05:23
@bryantbiggs bryantbiggs merged commit 73e33fe into terraform-aws-modules:master Oct 16, 2024
23 checks passed
antonbabenko pushed a commit that referenced this pull request Oct 16, 2024
## [6.10.0](v6.9.0...v6.10.0) (2024-10-16)

### Features

* Support `cloudwatch_log_group_tags` parameter ([#571](#571)) ([73e33fe](73e33fe))

### Bug Fixes

* Update CI workflow versions to latest ([#570](#570)) ([220cc85](220cc85))
@antonbabenko
Copy link
Member

This PR is included in version 6.10.0 🎉

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 Nov 16, 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