Q: 17
[Navigate Terraform State and Backends]
Which provider authentication method prevents credentials from being stored in the state file?
Options
Discussion
A. Environment variables is the only method here where creds aren't saved in state-B is tempting but puts secrets at risk. Seen this exact trap on practice sets!
I remember a similar scenario from labs. on my practice set, it's A. Using environment variables keeps credentials out of both code and state files, which is what Terraform recommends for sensitive data. Correct me if I'm missing something.
Looks like A here, since environment variables let the provider get creds at runtime and they don't end up written in the state file. Configuring creds in provider blocks or as variables will usually put them in state, which isn't ideal. Nice clear question for Terraform basics.
Its A, not B. B is a classic trap since creds in provider block end up in state.
Be respectful. No spam.