-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Can't use cache_nodes output of aws_elasticache_cluster as a list #826
Comments
I'm getting this as well with 0.9.8. Would be nice with a fix. |
Also running into this on 0.9.8, exact same use case 😭 |
Running into the same issue creating CloudWatch alarms with version 0.9.11.
I get the following errors applying it all together:
When I re-run terraform apply I get this error:
Update: |
I got the same issue with 0.10.6. |
Same issue in 0.10.8 |
Same error / problem...
|
Same problem with. Trying to register cluster nodes in consul catalog: |
Any workarounds for this? |
Yes. I found something today looking at a reference in the bug. use lookup
Tested in Terraform version 10.6 |
Is there a workaround that will let me dump the entire list of addresses into a comma separated list. I tried using various forms of |
I was experiencing this same issue when trying to create an elasticache cluster using this cloudposse wrapper module and Terraform v0.11.11. The result was a suppressed error message that results in:
Once I removed usage of that wrapper module it uncovered the actual error message and root cause which was the cluster I was attempting to create was >20 characters in length. Error message once I ran plan without the wrapper module:
I do not believe this is a bug with the aws provider and aws_elasticache_cluster resource and should be closed and referenced by hashicorp/terraform#18129 |
The issue found by @TechDawg270 appears to be similar to hashicorp/terraform#18129 which is fixed in Terraform 0.12. 👍 |
Hi folks 👋 This issue is resolved in Terraform 0.12, which fully supports indexed splat ( Given this configuration: terraform {
required_providers {
aws = "2.20.0"
}
required_version = "0.12.5"
}
provider "aws" {
region = "us-east-2"
}
resource "aws_elasticache_cluster" "test" {
cluster_id = "bflad-testing"
engine = "memcached"
node_type = "cache.t2.micro"
num_cache_nodes = 3
}
output "test1" {
value = aws_elasticache_cluster.test.cache_nodes[*].address
}
output "test2" {
value = element(aws_elasticache_cluster.test.cache_nodes[*].address, 1)
}
output "test3" {
value = join(",", formatlist("%s:%s", aws_elasticache_cluster.test.cache_nodes[*].address, aws_elasticache_cluster.test.cache_nodes[*].port))
} We can get the various expected outputs that were problematic in Terraform 0.11 and earlier:
Enjoy! 🚀 |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @phoolish as hashicorp/terraform#15040. It was migrated here as part of the provider split. The original body of the issue is below.
This seems to be the return of hashicorp/terraform#8794
Terraform Version
0.9.6
0.9.2
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
3 route53_records should be generated.
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: