Sensitive output values
📖 Scenario: You are managing cloud infrastructure using Terraform. Some outputs contain sensitive information like passwords or API keys. You want to keep these values hidden when Terraform shows outputs after applying changes.
🎯 Goal: Create a Terraform configuration that defines an output with a sensitive value. Mark the output as sensitive so Terraform does not display it openly.
📋 What You'll Learn
Create a Terraform output named
db_password with the value "supersecret123"Mark the
db_password output as sensitive using the sensitive = true attribute💡 Why This Matters
🌍 Real World
Cloud engineers often manage secrets like passwords or API keys. Marking outputs as sensitive helps keep these secrets safe from accidental exposure.
💼 Career
Knowing how to handle sensitive data in Terraform is essential for secure infrastructure management and compliance.
Progress0 / 4 steps