Question 350
At Kestrelview Logistics Networks, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a subnet identifier changes on a resource and the plan marks replacement but the team expects an in-place update. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. What mechanism explains why the original approach fails?
Explanation
Correct Answer
Providers can require destroy-and-recreate when a resource attribute cannot be changed in place. That mechanism distinguishes plan replace triggered by immutable attribute in the Kestrelview Logistics Networks case. The corresponding appropriate correction is: Review the provider's immutable argument behavior and approve a safe replacement strategy. The measurable acceptance test is: The plan identifies which dependent resources will be replaced.
Incorrect Answers
The offered principle describes: Some resource values cannot be known until remote creation occurs. The situation in this question instead depends on: Providers can require destroy-and-recreate when a resource attribute cannot be changed in place. These are different technical conditions.
This alternative is valid when destroy is intended to remove resources tracked by the target root configuration and state. The facts here establish a different controlling reason: Providers can require destroy-and-recreate when a resource attribute cannot be changed in place.
“Terraform supports configurable internal diagnostic log verbosity through environment variables” reflects the mechanism: Terraform supports configurable internal diagnostic log verbosity through environment variables. The actual reported symptoms are better explained by: Providers can require destroy-and-recreate when a resource attribute cannot be changed in place.