Consider this Terraform output configuration:
output "db_password" {
value = aws_db_instance.example.password
sensitive = true
}What is the effect of setting sensitive = true on this output?
output "db_password" {
value = aws_db_instance.example.password
sensitive = true
}Think about what sensitive means for output visibility.
Marking an output as sensitive tells Terraform to hide its value in CLI output and state files to avoid accidental exposure.
Choose the correct Terraform output block that marks the secret api_key as sensitive.
Check the exact attribute name Terraform uses for marking outputs sensitive.
The correct attribute to mark outputs as sensitive is sensitive = true. Other attributes like secret or hidden are invalid.
You manage Terraform code used by multiple teams. Some outputs contain sensitive data like passwords or keys.
Which approach best protects sensitive outputs while allowing teams to use necessary information?
Think about controlling access to state files and output visibility.
Marking outputs sensitive hides them in CLI and state files. Sharing state files only with authorized teams protects secrets.
Consider marking outputs as sensitive in Terraform. Which of the following is a true limitation?
Think about where Terraform stores output values and what sensitive controls.
Marking outputs sensitive hides them in CLI and logs but does not encrypt the state file by default. Additional encryption must be configured separately.
You run Terraform in a CI/CD pipeline that outputs sensitive values. Which practice best prevents accidental exposure of these sensitive outputs?
Consider how outputs appear in logs and environment variables during pipeline runs.
Marking outputs sensitive prevents Terraform from printing them in CLI output. Avoid printing them in logs or environment variables to prevent exposure.