Question 660
At Umberwick Education Services, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a database resource must not be created unless a configured backup retention value meets a minimum compliance period. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. Which operational control addresses the risk long term?
Explanation
Correct Answer
Encode mandatory lifecycle safety assumptions in preconditions. This control addresses resource precondition guard because preconditions assert configuration requirements before performing a managed operation. The original implementation remedy remains: Add a lifecycle precondition to reject insufficient retention before resource creation.
Incorrect Answers
This safeguard is for the dependency described by: Terraform check assertions report warnings rather than acting like resource lifecycle hard failures. The continuing risk here is determined by: Preconditions assert configuration requirements before performing a managed operation. The targeted safeguard is “Encode mandatory lifecycle safety assumptions in preconditions”.
“Publish structured input schemas for reusable modules” addresses a different recurring failure: Terraform object types define explicit named attributes and their expected types. For the condition in this question, maintain “Encode mandatory lifecycle safety assumptions in preconditions” because preconditions assert configuration requirements before performing a managed operation.
This safeguard is for the dependency described by: Each repeated Terraform resource instance has its own address and state mapping. The continuing risk here is determined by: Preconditions assert configuration requirements before performing a managed operation. The targeted safeguard is “Encode mandatory lifecycle safety assumptions in preconditions”.