Rationale for Correct Answer: Terraform can store state in a remote backend (remote location) configured in the terraform block (for example, terraform { backend " s3 " { ... } } or terraform { cloud { ... } }). Remote backends store the state outside the local filesystem and often add collaboration features like locking.
Analysis of Incorrect Options (Distractors):
B: Incorrect—CLI configuration files (like .terraformrc / terraform.rc) control CLI behavior (credentials helpers, plugin cache, etc.), but backend/state storage is configured in the Terraform configuration (terraform block) and initialized with terraform init.
C: Incorrect—Terraform must persist state between runs; in-memory storage would be lost when the process ends.
D: Incorrect—environment variables can influence behavior (e.g., credentials, logging), but Terraform does not store state in environment variables.
Key Concept: Configuring remote backends for state storage via the terraform block.
[Reference: Terraform Objectives — Navigate Terraform State and Backends (backend configuration and remote state), Implement and Maintain State (state storage)., , , , ]
Submit