How do you make sure resources are encrypted by default?
BeginnerProductionSecurity, Secrets and Access
Answer
Bake it into modules (server_side_encryption_configuration, storage_encrypted = true, encrypted = true on EBS) with a KMS key input, then check with policy: Checkov rules such as CKV_AWS_19 (S3 encryption) or custom OPA rules on plan JSON. Also set account-level defaults (EBS default encryption, S3 default) in the baseline stack.
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