github.com/hashicorp/terraform-plugin-sdk@v1.17.2/terraform/testdata/apply-provisioner-conninfo/main.tf (about)

     1  variable "pass" {
     2  }
     3  
     4  variable "value" {
     5  }
     6  
     7  resource "aws_instance" "foo" {
     8      num = "2"
     9      compute = "value"
    10      compute_value = "${var.value}"
    11  }
    12  
    13  resource "aws_instance" "bar" {
    14      connection {
    15          host = "localhost"
    16          type = "telnet"
    17      }
    18  
    19      provisioner "shell" {
    20          foo = "${aws_instance.foo.value}"
    21          connection {
    22              host = "localhost"
    23              type = "telnet"
    24              user = "superuser"
    25              port = 2222
    26              password = "${var.pass}"
    27          }
    28      }
    29  }