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: Add cloudwatch_log_group_arn to outputs #1071

Merged

Conversation

krrrr38
Copy link
Contributor

@krrrr38 krrrr38 commented Oct 28, 2020

PR o'clock

Description

  • Problem
    • Currently we cannot apply some resources which depends on eks module generated cloudwatch logs arn, like followings.
  • How to solve?
    • add output cloudwatch_log_group_arn
module "eks" {
  source = "terraform-aws-modules/eks/aws"
  ...
}

resource "aws_lambda_permission" "log" {
  ...
  source_arn    = module.eks.cloudwatch_log_group_arn // <- we cannot pass cloudwatch arn in the same terraform apply.
}

To work-around, we need to define data resource. But in this case, we need to execute terraform apply twice to get cloudwatch resource.

data "aws_cloudwatch_log_group" "log" {
  name = module.eks.cloudwatch_log_group_name[0]
}

Checklist

@barryib barryib changed the title feat: output cloudwatch_log_group_arn feat: Add cloudwatch_log_group_arn to outputs Oct 28, 2020
outputs.tf Outdated Show resolved Hide resolved
@krrrr38 krrrr38 force-pushed the output-cloudwatch-logs-arns branch from 02bfa22 to 5f61c20 Compare October 28, 2020 22:03
@krrrr38
Copy link
Contributor Author

krrrr38 commented Oct 28, 2020

ci failed on master branch, and fix it in #1073

@barryib barryib merged commit 62a8f46 into terraform-aws-modules:master Oct 29, 2020
@barryib
Copy link
Member

barryib commented Oct 29, 2020

Thanks @krrrr38 for your contribution.

@krrrr38
Copy link
Contributor Author

krrrr38 commented Oct 29, 2020

than you to maintain this module 🙏

@krrrr38 krrrr38 deleted the output-cloudwatch-logs-arns branch October 29, 2020 00:26
@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 Nov 16, 2022
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.

2 participants