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

Change cloudwatch submodule to pass context #74

Merged
merged 4 commits into from
Aug 23, 2024
Merged

Conversation

nnsense
Copy link
Contributor

@nnsense nnsense commented Aug 22, 2024

what

A patch to pass the context instead of just vars to the CloudWatch submodule.

why

This module is only setting the context vars instead of the whole context inside the Cloudwatch submodule, leaving up to the submodule to set its own contex.

module "cloudwatch_log_group" {
  source  = "cloudposse/cloudwatch-logs/aws"
  version = "0.6.6"

  enabled = module.this.enabled

  iam_role_enabled  = false
  kms_key_arn       = var.cloudwatch_logs_kms_key_arn
  retention_in_days = var.cloudwatch_logs_retention_in_days
  name              = "/aws/lambda/${var.function_name}"
  tags              = module.this.tags
}

By settings the context (as advised by cloudposse) the root deployment are passed to the submodule, and an upper/camel/pascal case function_name will be consistent with the Cloudwatch group name.

references

@nnsense nnsense requested review from a team as code owners August 22, 2024 08:31
@mergify mergify bot added the triage Needs triage label Aug 22, 2024
@milldr
Copy link
Sponsor Member

milldr commented Aug 22, 2024

/terratest

main.tf Show resolved Hide resolved
@milldr
Copy link
Sponsor Member

milldr commented Aug 23, 2024

/terratest

@mergify mergify bot removed the triage Needs triage label Aug 23, 2024
@milldr milldr merged commit 106693d into cloudposse:main Aug 23, 2024
27 checks passed
@nnsense
Copy link
Contributor Author

nnsense commented Aug 23, 2024

Thanks @milldr :)

Copy link

These changes were released in v0.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloudwatch submodule naming forces the var function_name to lower.
2 participants