terraform查找问题 [英] Issue with terraform lookup
本文介绍了terraform查找问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我运行Terraform Plan时得到的,它以前可以在以前的版本中运行,所以基本上concat返回的是列表而不是字符串.
This is what I'm getting when I run terraform plan, It used to work earlier with previous version, So basically concat is returning list instead of string.
Errors:
* At column 3, line 1: lookup: argument 2 should be type string, got type list in:
${lookup(var.az, concat("zone", count.index + 1))}
我正在使用terraform的编译版本
I'm using compiled version of terraform
$ terraform --version
Terraform v0.7.0-dev (854c9bd488dfdb12303ec47e42d6de8fc17e40a5)
推荐答案
检查 CHANGELOG (在升级版本之前,最好先使用Terraform,因为它们会不断开发并经常进行非向后兼容的更改.)
Check the CHANGELOG (always a good idea with Terraform before upgrading versions as they are constantly developing and frequently make non-backwards-compatible changes.)
0.7(未发布)
0.7 (Unreleased)
向后的不兼容/注意:
[...]
- concat()插值函数不能再用于连接字符串.
[...]
- 您现在可以使用var.map ["key"]语法或 查找功能而不是var.map.key.
- You now access the values of maps using the syntax var.map["key"] or the lookup function instead of var.map.key.
这篇关于terraform查找问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文