Preconditions vs Validation
A rule says "if env is prod, replicas must be at least 2". Where can it be expressed in OpenTofu 1.8?
env
prod
replicas
Choose one answer
As a precondition in a resource's lifecycle.
precondition
lifecycle
In the provider block's configuration.
Only in a CI script that parses the .tfvars file before the plan runs.
.tfvars
In a validation block on the replicas variable only.
validation