<p>I have the following in <code>main.tf</code></p>
<pre><code>data &quot;kubectl_path_documents&quot; &quot;yaml-files&quot; {
  pattern = &quot;${path.module}/manifests/*.yaml&quot;
}

resource &quot;kubectl_manifest&quot; &quot;yaml-manifests&quot; {
  for_each  = toset(data.kubectl_path_documents.yaml-files.documents)
  yaml_body = each.value
}
</code></pre>
<p>I would need to parameterize certain fields in the yaml files to be able to deploy different set of resources for dev vs prod. I knew there was a way to do this if it was one yaml. How should this be done for many yaml files</p>
<pre><code>├── manifests
│   ├── gdp-configmap.yaml
│   ├── gdp-agent-deamonset.yaml
│   ├── gdp-collector-configmap.yaml
│   ├── gdp-collector-deployment.yaml
</code></pre>
<p>Any help is appreciated.</p>

<p>I was able to resolve this using a null_resource that executes a sh script with values to be sed'ed.</p>
