Newer
Older
openstack-caracal-dc-dc / tests / opentofu-validate / fixtures / s3-good / modules / fine / main.tf
# The correct form: stash the value in `input`, read it back via self.input.*
# in the destroy provisioner.
variable "target" {
  type    = string
  default = "host"
}

resource "terraform_data" "fine" {
  input = {
    target = var.target
  }

  provisioner "local-exec" {
    when    = destroy
    command = "echo ${self.input.target}"
  }
}