HashiCorp Certified: Terraform Associate — Question 155

Select the command that doesn’t cause Terraform to refresh its state.

Answer options

Correct answer: D

Explanation

The correct answer is D, as 'terraform state list' only retrieves the current state without making any changes or refreshing it. In contrast, 'terraform apply', 'terraform destroy', and 'terraform plan' all involve operations that necessitate refreshing the state to ensure it is up to date with the actual infrastructure.