Question 130
At Eastcliff Cloud Operations, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a developer commits the large .terraform provider cache into Git thinking it is the provider lockfile. 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
The installed plugin cache is local build output whereas the lockfile records dependencies. That mechanism distinguishes version control ignore for downloaded providers in the Eastcliff Cloud Operations case. The corresponding appropriate correction is: Version the .terraform.lock.hcl file while ignoring downloaded .terraform artifacts. The measurable acceptance test is: A clean checkout initializes from lock information without checked-in plugin binaries.
Incorrect Answers
This alternative is valid when unbounded versions permit major releases that may change provider schemas and behavior. The facts here establish a different controlling reason: The installed plugin cache is local build output whereas the lockfile records dependencies.
“Providers distinguish data sources that query objects from managed resources that reconcile lifecycle” reflects the mechanism: Providers distinguish data sources that query objects from managed resources that reconcile lifecycle. The actual reported symptoms are better explained by: The installed plugin cache is local build output whereas the lockfile records dependencies.
The offered principle describes: Speculative plans preview changes in review workflows without applying infrastructure. The situation in this question instead depends on: The installed plugin cache is local build output whereas the lockfile records dependencies. These are different technical conditions.