terraform plan is giving the error : function call (function yamldecode) terraform plan is giving the error : function call (function yamldecode) elasticsearch elasticsearch

terraform plan is giving the error : function call (function yamldecode)


As is describe in 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.

and one can trivially reproduce your error message:

  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 extracontent after value.