Which method is NOT suitable for keeping secrets out of Terraform configuration files?

Master the HashiCorp Terraform Test with these flashcards and multiple choice questions. Each question includes hints and explanations to prepare you effectively. Set yourself up for success!

The method of keeping secrets out of Terraform configuration files that is considered unsuitable is the use of "secure string." This option implies a mechanism that is not explicitly provided by Terraform for managing secrets within configuration files. Terraform primarily relies on variable management techniques and environment variables for secret handling.

Using the -var flag allows users to pass variables to Terraform commands, which can include sensitive information without hardcoding it in the configuration files. This method provides a way to inject secrets at runtime, maintaining a separation from the code.

Setting environment variables is another common practice. By configuring sensitive data as environment variables, Terraform can read them at runtime, isolating sensitive information from the source code.

A Terraform provider specifically designed for secret management, such as Vault or AWS Secrets Manager, can also facilitate secure secret handling. Providers allow Terraform to access and manage secrets dynamically, which means sensitive data does not reside in configuration files.

Each of these methods—using the -var flag, setting environment variables, and leveraging appropriate Terraform providers—is effective for keeping secrets out of configuration files, whereas "secure string" does not align with Terraform's capabilities and practices for secret management.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy