ExamGecko
Question list
Search
Search

Question 64 - Terraform Associate 003 discussion

Report
Export

Which provider authentication method prevents credentials from being stored in the state file?

A.
Using environment variables
Answers
A.
Using environment variables
B.
Specifying the login credentials in the provider block
Answers
B.
Specifying the login credentials in the provider block
C.
Setting credentials as Terraform variables
Answers
C.
Setting credentials as Terraform variables
D.
None of the above
Answers
D.
None of the above
Suggested answer: D

Explanation:

None of the above methods prevent credentials from being stored in the state file. Terraform stores the provider configuration in the state file, which may include sensitive information such as credentials. This is a potential security risk and should be avoided if possible. To prevent credentials from being stored in the state file, you can use one of the following methods:

Use environment variables to pass credentials to the provider. This way, the credentials are not part of the provider configuration and are not stored in the state file. However, this method may not work for some providers that require credentials to be set in the provider block.

Use dynamic credentials to authenticate with your cloud provider. This way, Terraform Cloud or Enterprise will request temporary credentials from your cloud provider for each run and use them to provision your resources. The credentials are not stored in the state file and are revoked after the run is completed. This method is supported for AWS, Google Cloud Platform, Azure, and Vault.Reference= : [Sensitive Values in State] :Authenticate providers with dynamic credentials

asked 18/09/2024
Vojtech Danek
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first