mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-22 02:20:07 -04:00
29 lines
414 B
HCL
29 lines
414 B
HCL
provider "test" {
|
|
region = "somewhere"
|
|
}
|
|
|
|
variable "test_var" {
|
|
default = "bar"
|
|
}
|
|
|
|
action "test_action" "hello" {
|
|
count = 3
|
|
config {
|
|
attr = "Hello, World #${count.index}!"
|
|
}
|
|
}
|
|
|
|
resource "test_instance" "test" {
|
|
ami = var.test_var
|
|
|
|
lifecycle {
|
|
action_trigger {
|
|
events = [before_create]
|
|
actions = [action.test_action.hello[0]]
|
|
}
|
|
}
|
|
}
|
|
|
|
output "test" {
|
|
value = var.test_var
|
|
}
|