Sign in
Menu
Sign up
Docs
Operational rules

Rule catalog

Every Operational Rule, for engineers choosing which one to apply. Each card opens the rule's page: what it changes, before-and-after HCL, how to enable it, and its known limits. Rules are applied during terraform init, with no forks and no wrapper modules.

Prevent destroy data

Adds prevent_destroy = true to data-bearing resources. Blocks accidental deletion of S3 buckets, RDS instances, Aurora clusters, DynamoDB tables, EFS file systems, and ElastiCache replication groups.

S3RDSAuroraDynamoDBEFSElastiCache
Ignore tag changes

Adds ignore_changes for tags and tags_all on every AWS resource that takes tags. Prevents Terraform from reverting tags managed by AWS Config, Service Catalog, or external automation.

All AWS resources
Ignore selected tag keys

Adds ignore_changes for the tag keys your organization names, and nothing else. Silences a scanner's or inventory agent's tag while every other tag stays managed.

S3
Ignore autoscaling changes

Adds ignore_changes for read_capacity and write_capacity on DynamoDB tables. Prevents Terraform from reverting autoscaler adjustments on every plan.

DynamoDB
Ignore AMI changes

Adds ignore_changes for the ami and image_id attributes on EC2 instances and launch templates. Prevents Terraform from forcing instance replacement when an AMI lookup resolves to a newer image.

EC2Launch templates
Prevent destroy encryption

Adds prevent_destroy = true to encryption key resources. Protects KMS keys and Secrets Manager secrets from accidental deletion.

KMSSecrets Manager
No provisioners

Removes all provisioner blocks from all resources. Provisioners bypass the declarative model and introduce hidden side effects.

All resources
Allowed regions

Adds a validation block to the module's region variable, so a region outside your organization's allowlist is rejected before anything is created.

All AWS resources
Restrict instance types

Reports GPU and specialty EC2 instance types (p3, p4, x1, x2, u-*) written into a module as literals. The module is delivered unchanged and nothing is blocked.

EC2
Create before destroy

Adds create_before_destroy = true to security groups and ACM certificates. The replacement exists before the old resource is destroyed, so an attached interface or listener keeps working.

VPCACM
Ignore deployed artifacts

Adds ignore_changes for the artifact pointer a pipeline rewrites: the Lambda zip, hash or image, and the ECS task definition revision. Terraform stops rolling deployments back.

LambdaECS
Ignore scaling changes

Adds ignore_changes for the capacity an autoscaler owns: desired_capacity on Auto Scaling groups, desired_size on EKS node groups, desired_count on ECS services. terraform-aws-eks and the terraform-aws-ecs service module already ignore these.

Auto ScalingEKSECS
Set EKS node group desired size

Opt-in. Lets Terraform change a terraform-aws-eks managed node group's desired, min and max size after create, with the AWS CLI from terraform_data. Needs the AWS CLI where terraform apply runs.

EKS
Ignore secret rotation

Adds ignore_changes for password on RDS instances and master_password on Aurora clusters. A credential that rotates outside Terraform stops showing as a diff on every plan.

RDSAurora
Set deletion protection

Sets the provider's deletion-protection attribute on RDS instances, Aurora clusters, DynamoDB tables and load balancers. AWS refuses the deletion, from Terraform, the console or the API.

RDSAuroraDynamoDBELB
Abort incomplete multipart uploads

Adds a validation to the module's lifecycle_rule variable requiring an enabled rule that aborts incomplete multipart uploads within a bounded number of days. Rejected on your side before anything is created.

S3

On this page

Ask AI about this

Help improve this page