I have issues
I'm submitting a...
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.
- Create a new cluster and set
cluster_enabled_log_types = ["api"] so the CloudWatch group gets created.
- Wait for the cluster to be created and check the
cloudwatch_log_group_name output is in the state
- 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"
}
- 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.
I have issues
I'm submitting a...
What is the current behavior?
The
cloudwatch_log_group_nameoutput from the cluster is currently returned as a tuple.If this is a bug, how to reproduce? Please include a code sample if relevant.
cluster_enabled_log_types = ["api"]so the CloudWatch group gets created.cloudwatch_log_group_nameoutput is in the statecloudwatch_log_group_nameoutput in a different resource, like below:What's the expected behavior?
The
cloudwatch_log_group_nameoutput 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
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.