HashiCorp
TERRAFORM-ASSOCIATE-004 · Question #82
Which provider authentication method prevents credentials from being stored in the state file?
The correct answer is A. Using environment variables. When using environment variables to provide authentication credentials, Terraform does not store these credentials in the state file. This is a secure method of passing sensitive information to Terraform because the credentials are not directly managed by Terraform itself, reduci
Submitted by rohit_dlh· Apr 18, 2026Understand Terraform Providers
Question
Which provider authentication method prevents credentials from being stored in the state file?
Options
- AUsing environment variables
- BSpecifying the login credentials in the provider block
- CSetting credentials as Terraform variables
- DNone of the above
How the community answered
(64 responses)- A91% (58)
- B5% (3)
- C2% (1)
- D3% (2)
Explanation
When using environment variables to provide authentication credentials, Terraform does not store these credentials in the state file. This is a secure method of passing sensitive information to Terraform because the credentials are not directly managed by Terraform itself, reducing the risk of exposing them inadvertently.
Topics
#Provider authentication#Security best practices#State file security#Environment variables
Community Discussion
No community discussion yet for this question.