gpt4 book ai didi

elasticsearch - terraform计划给出错误:函数调用(函数yamldecode)

转载 作者:行者123 更新时间:2023-12-03 02:14:21 26 4
gpt4 key购买 nike

请找到我们正在使用的terraform脚本的GitLab存储库。
enter link description here
在Terraform计划中运行会在 Elasticsearch 的多合一.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.
enter image description here

最佳答案

the fine manual中所述:

Only one YAML document is permitted. If multiple documents are present in the given string then this function will return an error.


并且可以轻松重现您的错误消息:
  content  = yamldecode("---\nhello: world\n---\ntoo: bad\n")
  on main.tf line 14, in resource "local_file" "example":
14: content = yamldecode("---\nhello: world\n---\ntoo: bad\n")

Call to function "yamldecode" failed: on line 2, column 1: unexpected extra
content after value.

关于elasticsearch - terraform计划给出错误:函数调用(函数yamldecode),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63901836/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com