I am trying to create a Filebeat configuration file after creating a instance with Terraform:
resource \"local_file\" \"greylogIP\" {
content = <
You need to escape a literal dollar ($
) with a double dollar ($$
).
The interpolation documentation covers this:
You can escape interpolation with double dollar signs: $${foo} will be rendered as a literal ${foo}.
There's some further mention of it in the template docs:
Important: Template variables in an inline template (such as consul_address above) must be escaped with a double-$. Unescaped interpolations will be processed by Terraform normally prior to executing the template.