OpenTofu Rules
Open-source Terraform alternative for infrastructure as code. Community-driven, backward-compatible, and truly open.
3 rules
Module Design and Composition
Intermediate
Design reusable OpenTofu modules with clear interfaces — explicit input variables with validation, meaningful outputs, proper versioning, and composition over monolithic configurations.
globs: **/*.tf, **/*.tofu, **/modules/**
modules, composition, reusability, variable-validation
View Rule
OpenTofu HCL Naming Conventions
Beginner
Enforce consistent naming across OpenTofu configurations — snake_case for HCL identifiers, kebab-case for cloud resources, standard file organization, and module naming patterns.
globs: **/*.tf, **/*.tofu, **/*.tfvars
naming-conventions, file-organization, hcl, snake-case
View Rule
State Encryption Configuration
Intermediate
Enable OpenTofu's native state encryption — configure encryption keys, key providers, and encryption methods to protect sensitive data in state files at rest.
globs: **/*.tf, **/*.tofu, **/backend.tf
state-encryption, security, kms, aes-gcm
View Rule