TA-002-P · Question #43
Which option can not be used to keep secrets out of Terraform configuration files?
The correct answer is C. A -var flag. 'secure string' is not a Terraform-native concept - it is an AWS SSM Parameter Store designation and cannot be used on its own as a Terraform mechanism to keep secrets out of config files. All other options are legitimate approaches: (A) providers such as HashiCorp Vault can dyna
Question
Which option can not be used to keep secrets out of Terraform configuration files?
Options
- AA Terraform provider
- BEnvironment variables
- CA -var flag
- Dsecure string
How the community answered
(23 responses)- A4% (1)
- B4% (1)
- C83% (19)
- D9% (2)
Explanation
'secure string' is not a Terraform-native concept - it is an AWS SSM Parameter Store designation and cannot be used on its own as a Terraform mechanism to keep secrets out of config files. All other options are legitimate approaches: (A) providers such as HashiCorp Vault can dynamically retrieve secrets at runtime; (B) environment variables prefixed with TF_VAR_ pass values without embedding them in config files; (C) the -var flag passes values at the command line, avoiding hardcoding in config. The provided answer key lists C, but the -var flag is a valid secret-injection method. The correct answer is D.
Topics
Community Discussion
No community discussion yet for this question.