Q: 16
[Read, Generate, and Modify Configurations]
You're building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject
sensitive variables into your Terraform run. How can you do this safely?
Options
Discussion
You should use the -var flag to pass sensitive variables at runtime, so they don't end up in your codebase or source control. D is much safer than storing secrets in files or repos. Pretty sure that's best practice, but open to feedback.
A is wrong, D. You don't want to put secrets in code or repos, so passing them using
-var and sourcing from a secret manager keeps things safer. Pretty standard CI/CD handling from what I've seen.Be respectful. No spam.