Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam Terraform-Associate-003 Topic 6 Question 1 Discussion

Actual exam question for HashiCorp's Terraform-Associate-003 exam
Question #: 1
Topic #: 6
[All Terraform-Associate-003 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: D

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


Contribute your Thoughts:

Nan
4 days ago
Haha, good luck with that. Variables are great, but they still end up in the state file. Environment variables are the way to go if you want to keep those creds super secure.
upvoted 0 times
...
Jacob
5 days ago
Yeah, that's what I was thinking too. Although, I wonder if there's some clever way to use variables instead. Wouldn't that be more flexible?
upvoted 0 times
...
Ena
6 days ago
I was thinking the same thing. Storing credentials in the state file is a big no-no, so environment variables seem like the way to go. It's a good way to keep them secure.
upvoted 0 times
...
Chu
7 days ago
Hmm, this is a tricky one. I'm pretty sure the answer is A) Using environment variables. That way, the credentials aren't stored in the state file, which is a big security risk.
upvoted 0 times
...

Save Cancel