Creating Filebeat configuration with Terraform

后端 未结 1 622
孤城傲影
孤城傲影 2021-01-26 19:12

I am trying to create a Filebeat configuration file after creating a instance with Terraform:

resource \"local_file\" \"greylogIP\" {
  content  = <

        
相关标签:
1条回答
  • 2021-01-26 19:18

    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.

    0 讨论(0)
提交回复
热议问题