/plushcap/analysis/spacelift/terraform-precondition-postcondition

Terraform Custom Conditions – Preconditions & Postconditions

What's this blog post about?

Terraform has introduced "preconditions" and "postconditions" in version 1.2.0 to validate deployments more effectively. Preconditions are used with assumptions, while postconditions are used with guarantees. These conditions can be added to the lifecycle block of a resource and include four parts: lifecycle block, precondition or postcondition block, condition, and error message. They provide greater flexibility in validating resources and ensuring deployments adhere to specific requirements.

Company
Spacelift

Date published
Aug. 4, 2022

Author(s)
Derek Morgan

Word count
1755

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.