BlackFriday 2024! 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
7 months 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
Dalene
7 months 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
...
Ariel
7 months ago
D) None of the above
upvoted 0 times
...
Yoko
7 months ago
C) Setting credentials as Terraform variables
upvoted 0 times
...
Sharika
7 months ago
B) Specifying the login credentials in the provider block
upvoted 0 times
...
Micah
7 months ago
A) Using environment variables
upvoted 0 times
...
...
Jacob
7 months 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
7 months 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 months 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