Sign in
Menu
Sign up
Docs
Terraform modules for AWSSecurity, Keys & Configuration

Terraform AWS KMS

KMS keys, aliases, grants, key policies, rotation, multi Region options, and tightly scoped permissions used to encrypt data across AWS services.

Quick start

module "kms" {
  source  = "awswellarchitected.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"

  # ... your arguments here
}
module "kms" {
  source  = "cccsmedium.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"

  # ... your arguments here
}
module "kms" {
  source  = "cfrpart11.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"

  # ... your arguments here
}
module "kms" {
  source  = "cisv500.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"

  # ... your arguments here
}
module "kms" {
  source  = "cis.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"

  # ... your arguments here
}
module "kms" {
  source  = "cisv80ig1.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"

  # ... your arguments here
}
module "kms" {
  source  = "cisacyberessentials.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"

  # ... your arguments here
}
module "kms" {
  source  = "fedramplow.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"

  # ... your arguments here
}

This module on the compliance.tf registry lists its versions, inputs and outputs. The Get Started guide and Registry Endpoints cover authentication and how to customize the module for your requirements.

Migration from upstream

Already using terraform-aws-modules? Change only the source URL:

module "kms" {
  source  = "terraform-aws-modules/kms/aws"
  version = "~> 4.2"
}
module "kms" {
  source  = "soc2.compliance.tf/terraform-aws-modules/kms/aws"
  version = "~> 4.2"
}

Same arguments. Same outputs. Controls are checked at terraform plan. The Migration Guide has the step-by-step version.

Reversibility

No lock-in. Switch back by reverting the source URL:

module "kms" {
  source  = "terraform-aws-modules/kms/aws"
}

Run terraform init -upgrade. Terraform state is unchanged: same resource addresses, same provider, no compliance.tf-specific resources. Controls you already applied remain in AWS.

Controls enforced

Up to 1 controls are checked at terraform plan when this module comes from a compliance.tf endpoint. Which ones are active depends on the endpoint; see Framework coverage.

ControlRetrofit effort
KMS CMK rotation should be enabledLow

Mapped compliance frameworks

ClauseControls from this module
Identity and access management
ClauseControls from this module
CM-3(6): Cryptography Management
ClauseControls from this module
11.30 Controls for open systems
ClauseControls from this module
3 Logging
ClauseControls from this module
4 Logging
ClauseControls from this module
4.6 Securely Manage Enterprise Assets and Software
ClauseControls from this module
Your Systems-3
ClauseControls from this module
Cryptographic Key Establishment And Management (SC-12)

Framework coverage

Which controls from this module are active under each framework endpoint. Your framework preferences choose the columns.

ControlWell-Architected Framework v10AWS Benchmark v5.0.0AWS Benchmark v6.0.0Controls v8.0 IG1CISA Cyber EssentialsCCCS Medium Cloud Control ProfileTitle 21 CFR Part 11FedRAMP Low Baseline Rev 4
KMS CMK rotation should be enabledEnforcedEnforcedEnforcedEnforcedEnforcedEnforcedEnforcedEnforced

Known Terraform limitations

Separately from the controls above, some things people ask this module for cannot be implemented by any module in any registry: they are limits of Terraform itself. Known limitations for this module lists the recurring ones: what causes each, the native workaround in full, and, where one exists, the opt-in Operational Rule that removes the need for a fork.

1 controls enforced with a source URL change.

Start free trialGet started

On this page

Ask AI about this

Help improve this page