Complete the code to mark the output value as sensitive.
output "db_password" { value = aws_db_instance.example.password sensitive = [1] }
Setting sensitive = true hides the output value from normal display.
Complete the code to output the database endpoint without exposing it as sensitive.
output "db_endpoint" { value = aws_db_instance.example.endpoint sensitive = [1] }
Setting sensitive = false allows the output to be visible.
Fix the error in the output block to correctly mark the secret key as sensitive.
output "secret_key" { value = aws_secretsmanager_secret.example.secret_string sensitive = [1] }
The sensitive attribute must be a boolean true, not a string or other value.
Fill both blanks to output the admin password as sensitive and add a description.
output "admin_password" { value = aws_iam_user.admin.password sensitive = [1] description = [2] }
Marking sensitive = true hides the password. Adding a description helps document the output.
Fill all three blanks to output the API key as sensitive, with a description and a custom export name.
output "api_key" { value = aws_api_gateway_api_key.example.value sensitive = [1] description = [2] export_name = [3] }
Setting sensitive = true hides the key. Description and export_name are strings that document and name the output.