How do you handle KMS keys in Terraform safely?
BeginnerProductionSecurity, Secrets and Access
Answer
Set deletion_window_in_days to 30, enable rotation, add prevent_destroy = true and write explicit key policies (do not rely on defaults) so you cannot lock yourself out. Deleting a key makes everything encrypted with it unreadable, so changes go through the highest review tier.
More on Security, Secrets and Access
How do you avoid hardcoded credentials in Terraform?BeginnerIs reading a secret with a data source safe?IntermediateHow do ephemeral resources and write-only arguments keep secrets out of state?AdvancedWhat is the better pattern for RDS master passwords?BeginnerHow do you scope IAM for the Terraform deploy role?IntermediateWhat are dynamic provider credentials in HCP Terraform?Intermediate