The correct answers are A and C. Terraform custom conditions let you define validation rules through precondition and postcondition blocks. When a resource uses count or for_each, Terraform evaluates preconditions separately for each resource instance, which allows instance-specific checks using values such as count.index or each.key. A precondition must pass before Terraform proceeds with the resource action, so it can block creation, update, or replacement when the configured condition is not satisfied. Option B is incorrect because Terraform can evaluate some conditions later if values are unknown during planning, depending on the expression and dependency graph. Option D is incorrect because a failed postcondition prevents downstream resources from relying on an invalid result, helping stop dependent changes from proceeding with bad assumptions.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit