cloudposse / terraform-aws-lambda-function

A module for launching Lambda Fuctions
https://cloudposse.com/accelerate
Apache License 2.0
30 stars 40 forks source link

Change cloudwatch submodule to pass context #74

Closed nnsense closed 3 weeks ago

nnsense commented 3 weeks ago

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

milldr commented 3 weeks ago

/terratest

milldr commented 3 weeks ago

/terratest

nnsense commented 3 weeks ago

Thanks @milldr :)

github-actions[bot] commented 3 weeks ago

These changes were released in v0.6.0.