github.com/LorbusChris/terraform@v0.11.12-beta1/terraform/test-fixtures/apply-provisioner-destroy-outputs/main.tf (about)

     1  module "mod" {
     2    source = "./mod"
     3  }
     4  
     5  locals {
     6    value = "${module.mod.value}"
     7  }
     8  
     9  resource "aws_instance" "foo" {
    10      provisioner "shell" {
    11          command  = "${local.value}"
    12          when = "destroy"
    13      }
    14  }
    15  
    16  module "mod2" {
    17    source = "./mod2"
    18    value = "${module.mod.value}"
    19  }
    20  
    21  output "value" {
    22    value = "${local.value}"
    23  }