<p>Please find the GitLab repo for the terraform scripts which we are using.
<a href="https://gitlab.com/komati.udaykiran/gkewithterraform" rel="nofollow noreferrer">enter link description here</a>
Run in terraform plan gives the below error in an all-in-one.YAML file for the elastic search.</p>
<pre><code>Error: Error in function call
 on kubernetes.tf line 49, in locals:
 49:   resource_list = yamldecode(file(&quot;${path. module}/all-in-one.yaml&quot;)).items
   |----------------
   | path.module is &quot;.&quot;

Call to function `&quot;yamldecode&quot;` failed: on line 458, column 1: unexpected extra
content after value.
</code></pre>
<p><a href="https://i.stack.imgur.com/k7sAy.png" rel="nofollow noreferrer">enter image description here</a></p>

<p>As is describe in <a href="https://www.terraform.io/docs/configuration/functions/yamldecode.html" rel="nofollow noreferrer">the fine manual</a>:</p>
<blockquote>
<p>Only one YAML document is permitted. If multiple documents are present in the given string then this function will return an error.</p>
</blockquote>
<p>and one can trivially reproduce your error message:</p>
<pre><code>  content  = yamldecode(&quot;---\nhello: world\n---\ntoo: bad\n&quot;)
</code></pre>
<pre><code>  on main.tf line 14, in resource &quot;local_file&quot; &quot;example&quot;:
  14:   content  = yamldecode(&quot;---\nhello: world\n---\ntoo: bad\n&quot;)

Call to function &quot;yamldecode&quot; failed: on line 2, column 1: unexpected extra
content after value.
</code></pre>
