LoginSignup
2

More than 5 years have passed since last update.

terraform tfvarsでヒアドキュメントを使用した時にハマったこと

Posted at

概要

terraformのtfavarsに改行コード入れたい時、ヒアドキュメントを使用できます。
ですが、heredoc not terminatedといったエラーが出力されハマったので情報を残しておきます。

環境

$ terraform --version
Terraform v0.11.3

解決策

最後に空白行を追加して解決しました。

NGパターン

test = <<EOF
test1
test2
EOF

OKパターン

test = <<EOF
test1
test2
EOF

参考情報

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2