mirror of
https://github.com/hashicorp/terraform.git
synced 2026-06-09 00:42:48 -04:00
This allows precondition and postcondition checks to be declared for resources and output values as long as the preconditions_postconditions experiment is enabled. Terraform Core doesn't currently know anything about these features, so as of this commit declaring them does nothing at all.
34 lines
772 B
HCL
34 lines
772 B
HCL
resource "test" "test" {
|
|
lifecycle {
|
|
precondition {
|
|
condition = true # ERROR: Invalid precondition expression
|
|
error_message = "Must be true."
|
|
}
|
|
postcondition {
|
|
condition = true # ERROR: Invalid postcondition expression
|
|
error_message = "Must be true."
|
|
}
|
|
}
|
|
}
|
|
|
|
data "test" "test" {
|
|
lifecycle {
|
|
precondition {
|
|
condition = true # ERROR: Invalid precondition expression
|
|
error_message = "Must be true."
|
|
}
|
|
postcondition {
|
|
condition = true # ERROR: Invalid postcondition expression
|
|
error_message = "Must be true."
|
|
}
|
|
}
|
|
}
|
|
|
|
output "test" {
|
|
value = ""
|
|
|
|
precondition {
|
|
condition = true # ERROR: Invalid precondition expression
|
|
error_message = "Must be true."
|
|
}
|
|
}
|