nehiljain
nehiljain

Reputation: 689

Terraform plan failing after upgrade to 0.11.0 version

I am not able to understand how to move forward here. I tried doing terrform state list, terraform state pull. Things look fine to me but when I do terraform plan it breaks.

> terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_elasticache_subnet_group.default: Refreshing state... (ID: subnet-group-engineering-st-api-production)
aws_security_group.redis: Refreshing state... (ID: sg-3cc2dd4d)
aws_security_group.redis: Refreshing state... (ID: sg-70d13102)
aws_elasticache_subnet_group.default: Refreshing state... (ID: subnet-group-engineering-st-api-20171007-production)
aws_security_group_rule.access_in_api_cache_20171007: Refreshing state... (ID: sgrule-2218275132)
aws_security_group_rule.access_out_api_cache_20171007: Refreshing state... (ID: sgrule-2359785285)
aws_elasticache_cluster.redis: Refreshing state... (ID: st-api-2017-10-07)
aws_elasticache_cluster.redis: Refreshing state... (ID: st-api-2017-08-17)
aws_security_group_rule.access_in: Refreshing state... (ID: sgrule-3430292237)
aws_security_group_rule.access_out: Refreshing state... (ID: sgrule-1891306978)

Error: Error refreshing state: 1 error(s) occurred:

* module.api_cache_20171007.output.endpoint: At column 3, line 1: join: argument 1 should be type list, got type string in:

${join(":", aws_elasticache_cluster.redis.cache_nodes.0.address, aws_elasticache_cluster.redis.cache_nodes.0.port)}

Upvotes: 0

Views: 111

Answers (1)

Begin
Begin

Reputation: 321

If I understand correctly, you are passing 2 separate arguments for what you are trying to join and instead need to pass a list:

Try:

${join(":", [aws_elasticache_cluster.redis.cache_nodes.0.address, aws_elasticache_cluster.redis.cache_nodes.0.port])}

Docs here: https://www.terraform.io/docs/configuration/interpolation.html#join-delim-list-

Upvotes: 2

Related Questions