nerdexam
HashiCorp

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…

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

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)
  • A
    20% (10)
  • B
    80% (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

#Terraform Backend#terraform init#CLI Configuration#Secrets Management

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice