HashiCorp
TERRAFORM-ASSOCIATE-004 · Question #27
When you use a remote backend that needs authentication, HashiCorp recommends that you:
The correct answer is D. Use partial configuration to load the authentication credentials outside of the Terraform code. This is the recommended way to use a remote backend that needs authentication, as it allows you to provide the credentials via environment variables, command-line arguments, or interactive prompts, without storing them in the Terraform configuration files.
Submitted by hans_de· Apr 18, 2026Manage Terraform State
Question
When you use a remote backend that needs authentication, HashiCorp recommends that you:
Options
- AWrite the authentication credentials in the Terraform configuration files
- BKeep the Terraform configuration files in a secret store
- CPush your Terraform configuration to an encrypted git repository
- DUse partial configuration to load the authentication credentials outside of the Terraform code
How the community answered
(41 responses)- A7% (3)
- B5% (2)
- C2% (1)
- D85% (35)
Explanation
This is the recommended way to use a remote backend that needs authentication, as it allows you to provide the credentials via environment variables, command-line arguments, or interactive prompts, without storing them in the Terraform configuration files.
Topics
#Remote Backends#Authentication#Security Best Practices#Partial Backend Configuration
Community Discussion
No community discussion yet for this question.