Challenge - 5 Problems
Sensitive Variable Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Why mark a variable as sensitive in Terraform?
You have a Terraform variable that stores a database password. Why should you mark this variable as sensitive?
Attempts:
2 left
💡 Hint
Think about what happens when Terraform shows outputs during deployment.
✗ Incorrect
Marking a variable as sensitive hides its value in Terraform plan and apply outputs to avoid accidental exposure. It does not encrypt the state file or make the variable optional.
❓ Configuration
intermediate2:00remaining
Terraform variable declaration with sensitivity
Which Terraform variable declaration correctly marks the variable as sensitive?
Attempts:
2 left
💡 Hint
Check the exact attribute name Terraform uses for sensitive variables.
✗ Incorrect
Terraform uses the attribute 'sensitive = true' to mark variables as sensitive. Other attribute names are invalid and cause errors.
❓ Architecture
advanced2:00remaining
Best practice for storing sensitive variables in Terraform
You want to keep your sensitive variables secure and avoid committing them to version control. Which approach is best?
Attempts:
2 left
💡 Hint
Think about how to keep secrets out of version control safely.
✗ Incorrect
Storing sensitive variables in a separate file ignored by version control and loading it at runtime keeps secrets safe. Hardcoding or committing them even encoded risks exposure.
❓ service_behavior
advanced2:00remaining
Terraform output behavior with sensitive variables
You define an output in Terraform that references a sensitive variable. What will Terraform show when you run 'terraform output'?
Attempts:
2 left
💡 Hint
Consider how Terraform protects sensitive outputs from accidental exposure.
✗ Incorrect
Terraform hides sensitive output values by showing (sensitive) to prevent secrets from being exposed in the CLI output.
❓ security
expert3:00remaining
Terraform state file and sensitive data exposure
Which statement about sensitive variables and the Terraform state file is true?
Attempts:
2 left
💡 Hint
Think about what Terraform does by default with state files and sensitive data.
✗ Incorrect
Terraform stores all variable values, including sensitive ones, in the state file in plain text unless you configure encryption or use a secure backend.