Terraform 查找问题
Issue with terraform lookup
这就是我在 运行 terraform 计划时得到的结果,它曾经在早期版本中工作过,所以基本上 concat 返回的是列表而不是字符串。
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 的编译版本
$ terraform --version
Terraform v0.7.0-dev (854c9bd488dfdb12303ec47e42d6de8fc17e40a5)
检查 CHANGELOG(在升级版本之前使用 Terraform 总是一个好主意,因为它们不断开发并经常进行非向后兼容的更改。)
0.7 (Unreleased)
BACKWARDS INCOMPATIBILITIES / NOTES:
[...]
- The concat() interpolation function can no longer be used to join strings.
[...]
- You now access the values of maps using the syntax var.map["key"] or
the lookup function instead of var.map.key.
这就是我在 运行 terraform 计划时得到的结果,它曾经在早期版本中工作过,所以基本上 concat 返回的是列表而不是字符串。
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 的编译版本
$ terraform --version
Terraform v0.7.0-dev (854c9bd488dfdb12303ec47e42d6de8fc17e40a5)
检查 CHANGELOG(在升级版本之前使用 Terraform 总是一个好主意,因为它们不断开发并经常进行非向后兼容的更改。)
0.7 (Unreleased)
BACKWARDS INCOMPATIBILITIES / NOTES:
[...]
- The concat() interpolation function can no longer be used to join strings.
[...]
- You now access the values of maps using the syntax var.map["key"] or the lookup function instead of var.map.key.