Files
opentf/internal/configs/testdata/error-files/precondition-postcondition-constant.tf
Martin Atkins 9076400436 configs: Decode preconditions and postconditions
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.
2022-01-28 11:00:29 -05:00

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."
}
}