github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/terraform/test-fixtures/graph-provisioners/main.tf (about)

     1  variable "foo" {
     2      default = "bar"
     3      description = "bar"
     4  }
     5  
     6  provider "aws" {}
     7  
     8  resource "aws_security_group" "firewall" {}
     9  
    10  resource "aws_instance" "web" {
    11      ami = "${var.foo}"
    12      security_groups = [
    13          "foo",
    14          "${aws_security_group.firewall.foo}"
    15      ]
    16      provisioner "winrm" {
    17          cmd = "echo foo"
    18      }
    19      provisioner "winrm" {
    20          cmd = "echo bar"
    21      }
    22  }
    23  
    24  resource "aws_load_balancer" "weblb" {
    25      provisioner "shell" {
    26          cmd = "add ${aws_instance.web.id}"
    27          connection {
    28              type = "magic"
    29              user = "${aws_security_group.firewall.id}"
    30          }
    31      }
    32  }