Problem Statement
How should sensitive data such as passwords or keys be handled securely in Terraform?
Explanation
Sensitive data should never be hardcoded directly into Terraform configuration files.
Instead, teams should use environment variables, encrypted variable files, or secret management services like AWS Secrets Manager or HashiCorp Vault. Terraform also supports the 'sensitive' attribute to mask values in logs and outputs. These practices help ensure compliance and prevent accidental data leaks.
