terraform-module-library

Terraform Module Library

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "terraform-module-library" with this command: npx skills add first-fluke/fullstack-starter/first-fluke-fullstack-starter-terraform-module-library

Terraform Module Library

This skill provides standardized patterns and best practices for creating and using Terraform modules.

When to Use

  • Creating new reusable Terraform modules

  • Refactoring existing Terraform code into modules

  • Standardizing infrastructure patterns across the project

  • implement specific infrastructure components (VPC, GKE, RDS, etc.) using best practices

Module Structure

Standard directory structure for a Terraform module:

module-name/ ├── main.tf # Primary logic and resources ├── variables.tf # Input variable definitions ├── outputs.tf # Output value definitions ├── versions.tf # Provider and Terraform version constraints ├── README.md # Module documentation └── examples/ # Example configurations └── complete/ # Full example usage

Best Practices

Cloud Providers

Google Cloud Platform (GCP)

  • Use google-beta provider for beta features if necessary, but prefer GA.

  • Follow Google's "Cloud Foundation Toolkit" patterns where applicable.

  • Resource naming: Use standardized prefixes/suffixes (e.g., gcp-vpc-{env} ).

AWS

  • Use standard aws provider resources.

  • Tag all resources with consistent tags (Owner, Environment, Project).

General

  • Version Pinning: Always pin provider and Terraform versions in versions.tf .

  • Variables: Include description and type for all variables. Use validation blocks for constraints.

  • Outputs: Document all outputs.

  • State: Do not include backend configuration in modules; state is managed by the root configuration.

Common Module Patterns

Private Module Registry

If using a private registry, ensure source paths follow the registry's convention.

Local Modules

For local development or monorepos:

module "network" { source = "./modules/network"

...

}

Review Checklist

  • Does the module have a README.md with input/output documentation?

  • Are all variables typed and described?

  • Are resource names deterministic or correctly scoped?

  • Does it include examples/ ?

  • Is terraform_remote_state avoided within the module?

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

orchestrator

No summary provided by upstream source.

Repository SourceNeeds Review
General

commit

No summary provided by upstream source.

Repository SourceNeeds Review
General

ui-ux-pro-max

No summary provided by upstream source.

Repository SourceNeeds Review