mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-13 16:00:47 -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.
35 lines
772 B
HCL
35 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."
|
|
}
|
|
}
|