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

cloudwatch_log_group_name output returning incorrect value #1060

Closed
1 of 4 tasks
paul-pop opened this issue Oct 21, 2020 · 1 comment · Fixed by #1061
Closed
1 of 4 tasks

cloudwatch_log_group_name output returning incorrect value #1060

paul-pop opened this issue Oct 21, 2020 · 1 comment · Fixed by #1061

Comments

@paul-pop
Copy link

paul-pop commented Oct 21, 2020

I have issues

I'm submitting a...

  • bug report
  • feature request
  • support request - read the FAQ first!
  • kudos, thank you, warm fuzzy

What is the current behavior?

The cloudwatch_log_group_name output from the cluster is currently returned as a tuple.

If this is a bug, how to reproduce? Please include a code sample if relevant.

  1. Create a new cluster and set cluster_enabled_log_types = ["api"] so the CloudWatch group gets created.
  2. Wait for the cluster to be created and check the cloudwatch_log_group_name output is in the state
  3. Use the cloudwatch_log_group_name output in a different resource, like below:
resource "aws_cloudwatch_log_subscription_filter" "eks_cluster_logs_to_datadog" {
  name            = "${local.eks_cluster_name}-subscription"
  log_group_name  = module.eks_cluster.cloudwatch_log_group_name
  filter_pattern  = ""
  destination_arn = "lambda_arn_goes_here"
}
  1. Observe the error:
Error: Incorrect attribute value type

  on eks.tf line 151, in resource "aws_cloudwatch_log_subscription_filter" "eks_cluster_logs_to_lambda":
 151:   log_group_name  = module.eks.cloudwatch_log_group_name
    |----------------
    | module.eeks.cloudwatch_log_group_name is tuple with 1 element

Inappropriate value for attribute "log_group_name": string required.

What's the expected behavior?

The cloudwatch_log_group_name output should be a simple string so it can be reused correctly.

Are you able to fix this problem and submit a PR? Link here if you have already.

#1061

Environment details

  • Affected module version: 12.2.0
  • OS: macOS Catalina
  • Terraform version: v0.13.4

Any other relevant info

Temporary fix is to use module.eks_cluster.cloudwatch_log_group_name[0] instead but that's inconsistent with every other output.

@github-actions
Copy link

I'm going to lock this issue 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 similar to this, 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 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants