Challenge - 5 Problems
Terraform Outputs Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Why use outputs in Terraform?
Which of the following best explains why Terraform outputs are useful after infrastructure deployment?
Attempts:
2 left
💡 Hint
Think about what information you might need after creating resources.
✗ Incorrect
Terraform outputs let you see or share key details about your resources, such as IP addresses or connection strings, which helps in using or connecting to those resources.
❓ service_behavior
intermediate1:30remaining
What does this Terraform output show?
Given this Terraform output block, what value will be shown after deployment?
output "instance_ip" {
value = aws_instance.web.public_ip
}Attempts:
2 left
💡 Hint
Look at the attribute name used in the value.
✗ Incorrect
The output references public_ip which is the public IP address assigned to the instance resource.
❓ security
advanced2:00remaining
Security risk of exposing sensitive outputs
What is a potential security risk when Terraform outputs expose sensitive information like passwords or keys without protection?
Attempts:
2 left
💡 Hint
Consider what happens if secret data is printed openly.
✗ Incorrect
Outputs that include sensitive data can be seen by anyone with access to the Terraform state or output, so they should be marked sensitive or avoided.
❓ Architecture
advanced2:00remaining
Using outputs to connect modules
How do Terraform outputs help when connecting multiple modules in a complex infrastructure setup?
Attempts:
2 left
💡 Hint
Think about how modules share information.
✗ Incorrect
Outputs allow one module to expose values that other modules can consume as inputs, making it easier to build reusable and connected infrastructure parts.
✅ Best Practice
expert2:30remaining
Best practice for sensitive outputs in Terraform
Which Terraform output configuration correctly marks a sensitive value to avoid exposing it in plain text?
Terraform
output "db_password" {
value = aws_db_instance.main.password
sensitive = true
}Attempts:
2 left
💡 Hint
Check the official way to mark outputs as sensitive.
✗ Incorrect
Setting sensitive = true tells Terraform not to show the output value in plain text in CLI or logs.