Skip to content
Back to skills

Terraform Module Builder

BSecurity

Draft modular, reusable Infrastructure-as-Code Terraform modules for cloud infrastructure.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 27, 2026
developmentbashawsgcpazureterraformgit

Works with

  • cli

Security analysis

B75/100
  • criticalAccesses sensitive system or user directories

Pro shows the line behind each finding and how to fix it

Scanned September 27, 2026

npx -y skills add RMAzrim/opencode-artes --skill terraform-module-builder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Terraform Module Builder?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Terraform Module Builder
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/rmazrim-terraform-module-builder/badge)](https://www.skillsdirectory.com/skills/rmazrim-terraform-module-builder)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Terraform Module Builder
description: Draft modular, reusable Infrastructure-as-Code Terraform modules for cloud infrastructure.
metadata:
  source: skills/terraform-module-builder/terraform-module-builder.md
---

# Terraform Module Builder

## Prerequisites & Dependencies
- Terraform CLI 1.5+ installed and configured
- Cloud provider credentials (AWS, GCP, Azure) via `~/.aws/credentials`, `gcloud`, or `az cli`
- Text editor or IDE with HCL syntax highlighting
- Optional: `tflint` and `terraform fmt` for linting and formatting

## Execution Steps
1. Define the module directory structure: `variables.tf`, `inputs.tf`, `outputs.tf`, `main.tf`, and an optional `README.md`
2. Write `variables.tf` with clear input variables: names, types, defaults, and validation rules (`validation` block)
3. Write `main.tf` with resource definitions that accept input variables and produce logical outputs
4. Write `outputs.tf` with descriptive output values that consumers can reference in other modules or scripts
5. Add a `README.md` explaining the module's purpose, inputs, outputs, usage examples, and versioning scheme
6. Test the module locally: `terraform init`, `terraform plan`, and `terraform apply` in a throwaway workspace
7. Version the module: create a `vX.Y.Z` git tag and push to a registry (Terraform Registry or private Git repo)

```hcl
# variables.tf
variable "vpc_cidr" {
  description = "CIDR block for the VPC"
  type        = string
  default     = "10.0.0.0/16"
}

variable "instance_type" {
  description = "EC2 instance type"
  type        = string
  default     = "t3.micro"
}

# main.tf
resource "aws_vpc" "example" {
  cidr_block = var.vpc_cidr
}

resource "aws_instance" "example" {
  instance_type = var.instance_type
  ami           = data.aws_ami.default.id
  vpc_id        = aws_vpc.example.id
}

# outputs.tf
output "vpc_id" {
  description = "ID of the created VPC"
  value       = aws_vpc.example.id
}
```

```bash
terraform init
terraform plan -var="vpc_cidr=10.1.0.0/16"
terraform apply -auto-approve
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.