github.com/nevins-b/terraform@v0.3.8-0.20170215184714-bbae22007d5a/config/test-fixtures/heredoc.tf (about)

     1  provider "aws" {
     2    access_key = "foo"
     3    secret_key = "bar"
     4  }
     5  
     6  resource "aws_iam_policy" "policy" {
     7      name = "test_policy"
     8      path = "/"
     9      description = "My test policy"
    10      policy = <<EOF
    11  {
    12    "Version": "2012-10-17",
    13    "Statement": [
    14      {
    15        "Action": [
    16          "ec2:Describe*"
    17        ],
    18        "Effect": "Allow",
    19        "Resource": "*"
    20      }
    21    ]
    22  }
    23  EOF
    24  }
    25  
    26  resource "aws_instance" "test" {
    27    ami = "foo"
    28  
    29    provisioner "remote-exec" {
    30      inline = [
    31  <<EOT
    32  sudo \
    33  A=val \
    34  B=val2 \
    35  sh script.sh
    36  EOT
    37      ]
    38    }
    39  }
    40  
    41  resource "aws_instance" "heredocwithnumbers" {
    42    ami = "foo"
    43  
    44    provisioner "local-exec" {
    45      command = <<FOO123
    46  echo several
    47        lines
    48      of output
    49  FOO123
    50    }
    51  }