compliance.tf

Known Terraform limitations, module by module

A lifecycle block cannot take a variable. That single restriction is behind most of the recurring "why can't this module just…" requests: prevent_destroy on a data bucket, ignore_changes on tags an external controller writes, create_before_destroy on a security group that is still attached. No module in any registry can expose them, because Terraform evaluates lifecycle before it evaluates anything a module could pass in.

These pages document the ones that come up per module. Each problem states what causes it, links the upstream issues, gives the native workaround in full, and says whether compliance.tf has a rule for it yet - including where it does not.

The native option is named first, every time

Several of these problems have a good answer that needs nothing from compliance.tf: provider default_tags, a resource's own deletion protection, or simply not managing a field two systems both want to own. Those are named before any rule is.


Modules

ModuleRecurring problemsAnswered by a rule today
VPC11
Security group10
S3 bucket22
IAM11
RDS21
RDS Aurora11
EKS10
Auto Scaling10
ECS20
Lambda10
EC2 instance11
DynamoDB table22
KMS11
Secrets Manager11
ACM10

How to read a solutions page

  1. The symptom, written the way it gets searched for.
  2. Why Terraform cannot fix it, with the upstream issues so you can check.
  3. The native workaround in full, including when it is a fork.
  4. The rule, where one exists, with the HCL diff it produces - or an explicit "native option only, today" where it does not.

On a framework host you name the rules you want in ?add_rules=, on top of whatever Baseline your organization has Enforced; on an organization host that organization's configuration decides. See Operational Rules for the model and Operational Rule Definitions for what each rule is.

On this page

Ask AI about this

Help improve this page