tf-standards

Enforces authoring conventions for OpenTofu and Terraform source files including providers, variables, and modules.

Updated Aug 1, 2026
One-click install
npx skills add https://github.com/siegenthalerroger/.llmctl-marketplace --skill tf-standards-siegenthalerroger
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tf-standards
Source: https://github.com/siegenthalerroger/.llmctl-marketplace/tree/main/plugins/llmctl-ops-0.2.1/skills/tf-standards
Command: npx skills add https://github.com/siegenthalerroger/.llmctl-marketplace --skill tf-standards-siegenthalerroger

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing consistent, maintainable OpenTofu/Terraform code is hard when provider versions drift, variables lack defaults, and files become monolithic. This Skill codifies authoring conventions so every .tf, .tofu, and .tfvars file follows the same standards. ## Core Features & Use Cases - Provider & Variable Standards: Enforces latest stable provider versions, multi-method authentication patterns, sensible variable defaults, and tfvars minimalism. - OpenTofu-Native Syntax: Promotes lifecycle.enabled over count workarounds, opt-in Kubernetes secret creation, and comment minimalism. - Organization & Modules: Defines file-per-resource-type layout, colocated locals, single-responsibility modules, and snake_case naming, plus magodo/restful patterns for unsupported resources. - Use Case: When asked to add a new Keycloak OIDC client module, the Skill ensures the module mirrors existing structure, uses lifecycle.enabled for optional secrets, and keeps tfvars free of redundant defaults. ## Quick Start Ask the assistant to review or write OpenTofu/Terraform configuration files, such as creating a new provider configuration or refactoring variables.tf, and the standards will be applied automatically.

Frequently Asked Questions about tf-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write conditional resources in OpenTofu?▼

Use lifecycle.enabled with a descriptive boolean variable instead of Terraform's count workaround. Declare the variable with default false for opt-in behavior, which avoids index-based references like [0] throughout the code.

How should I organize Terraform files in a project?▼

Separate code by resource type: main.tofu for providers, variables.tf for variables and validation, outputs.tf for outputs, and one file per resource type. Colocate locals blocks with the resources that consume them rather than centralizing them.

Does this skill cover Terraform state operations and CI/CD?▼

No, it governs only source text authoring conventions. State operations, plan/apply safety, drift detection, module testing, and provider upgrades belong to the separate terraform-skill installed as an APM dependency.

How do I manage resources not supported by a Terraform provider?▼

Use the magodo/restful provider for CRUD lifecycle with drift detection. Key patterns include create_method PUT for pre-existing resources, read_selector for array responses, and read_response_template to prevent false drift.

What should go in a .tfvars file versus variable defaults?▼

Only set values that differ from defaults or are environment-specific or sensitive. Never set optional(bool, false) fields to false or optional(string) fields to null, since those are already the defaults.