ExamGecko
Question list
Search
Search

Question 136 - Terraform Associate 003 discussion

Report
Export

Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.

A.
A variable file
Answers
A.
A variable file
B.
Defined in Environment variables
Answers
B.
Defined in Environment variables
C.
Inside the backend block within the Terraform configuration
Answers
C.
Inside the backend block within the Terraform configuration
D.
Defined in a connection configuration outside of Terraform
Answers
D.
Defined in a connection configuration outside of Terraform
Suggested answer: B, D

Explanation:

Environment variables and connection configurations outside of Terraform are secure options for storing secrets for connecting to a Terraform remote backend. Environment variables can be used to set values for input variables that contain secrets, such as backend access keys or tokens. Terraform will read environment variables that start with TF_VAR_ and match the name of an input variable.For example, if you have an input variable called backend_token, you can set its value with the environment variable TF_VAR_backend_token1. Connection configurations outside of Terraform are files or scripts that provide credentials or other information for Terraform to connect to a remote backend.For example, you can use a credentials file for the S3 backend2, or a shell script for the HTTP backend3. These files or scripts are not part of the Terraform configuration and can be stored securely in a separate location. The other options are not secure for storing secrets. A variable file is a file that contains values for input variables. Variable files are usually stored in the same directory as the Terraform configuration or in a version control system. This exposes the secrets to anyone who can access the files or the repository.You should not store secrets in variable files1. Inside the backend block within the Terraform configuration is where you specify the type and settings of the remote backend. The backend block is part of the Terraform configuration and is usually stored in a version control system. This exposes the secrets to anyone who can access the configuration or the repository.You should not store secrets in the backend block4.Reference= [Terraform Input Variables]1, [Backend Type: s3]2, [Backend Type: http]3, [Backend Configuration]4

asked 18/09/2024
umar raad
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first