Which statement most accurately describes the effect of the state inspection commands 'terraform state list', 'terraform state show', and 'terraform show' on the state file?
- AThey are read-only and leave the recorded state unchanged when they run. Correct
- BThey refresh and overwrite the state with current provider values before displaying it.
- CThey remove any resource instances that no longer exist in the provider from the state.
- DThey acquire a write lock and modify the serial number of the state on each run.
Why A is correct: Correct. All three commands only read and display state; they inspect what is recorded without writing back or altering any instance.
Why B is wrong: Tempting because a plan refresh does update state, but these inspection commands display stored data and do not trigger a refresh or rewrite.
Why C is wrong: Pruning missing instances is associated with mutating commands such as 'state rm' or a refresh, not with read-only inspection.
Why D is wrong: Incrementing the serial and taking a write lock happens on operations that persist state; inspection commands do not need to modify the file to display it.