请找到我们正在使用的地形脚本的GitLab repo。在此处输入链接描述在地形图中运行计划在弹性搜索的all-in-one.YAML文件中给出以下错误。
Error: Error in function call
on kubernetes.tf line 49, in locals:
49: resource_list = yamldecode(file("${path. module}/all-in-one.yaml")).items
|----------------
| path.module is "."
Call to function `"yamldecode"` failed: on line 458, column 1: unexpected extra
content after value.
在此处输入图像描述
如精细手册中所述:
只允许使用一个YAML文档。如果给定字符串中存在多个文档,则此函数将返回一个错误。
并且可以琐碎地再现您的错误消息:
content = yamldecode("---nhello: worldn---ntoo: badn")
on main.tf line 14, in resource "local_file" "example":
14: content = yamldecode("---nhello: worldn---ntoo: badn")
Call to function "yamldecode" failed: on line 2, column 1: unexpected extra
content after value.