TA-002-P · Question #282
When configuring a remote backend in Terraform, it might be a good idea to purposely omit some of the required arguments to ensure secrets and other important data aren't inadvertently shared with…
The correct answer is B. command-line key/value pairs C. use the -backend-config=PATH to specify a separate config file D. interactively on the command line. Terraform supports partial backend configuration to avoid committing secrets to version control. The remaining configuration can be supplied in three ways: (B) command-line key/value pairs using -backend-config='key=value' flags on terraform init; (C) a separate configuration…
Question
When configuring a remote backend in Terraform, it might be a good idea to purposely omit some of the required arguments to ensure secrets and other important data aren't inadvertently shared with others. What are the ways the remaining configuration can be added to Terraform so it can initialize and communicate with the backend? (select three)
Options
- Adirectly querying HashiCorp Vault for the secrets
- Bcommand-line key/value pairs
- Cuse the -backend-config=PATH to specify a separate config file
- Dinteractively on the command line
How the community answered
(49 responses)- A20% (10)
- B80% (39)
Explanation
Terraform supports partial backend configuration to avoid committing secrets to version control. The remaining configuration can be supplied in three ways: (B) command-line key/value pairs using -backend-config='key=value' flags on terraform init; (C) a separate configuration file specified with -backend-config=PATH, which contains only the sensitive or environment-specific settings; and (D) interactively - if required arguments are still missing after all other sources are applied, Terraform will prompt for them on the command line. Option A (querying HashiCorp Vault directly) is not a built-in Terraform backend initialization mechanism, though Vault secrets can be injected via environment variables or wrapper scripts.
Topics
Community Discussion
No community discussion yet for this question.