Terraform Infrastructure

by aj-geddes3f5182cfd739No license355 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 7 months ago

Infrastructure as Code using Terraform with modular components, state management, and multi-cloud deployments. Use for provisioning and managing cloud resources.

Includes scriptsDevOps & Cloud
AI-generated overview

Guides Terraform infrastructure-as-code work: modules, remote state, and multi-cloud resource provisioning.

What it does
This skill provides guidance for building and managing cloud infrastructure with Terraform. It covers modular configuration, remote state with locking, variables and outputs, and multi-cloud provisioning across AWS, Azure, GCP, and on-premise resources. It ships reference guides, a configuration starter template, and a validation script for checking configuration.
When to use it
Use it when provisioning or managing cloud infrastructure as code, managing multiple environments such as dev, staging, and prod, or setting up remote state, modules, and deployment automation. It also fits infrastructure versioning, code review, and environment replication.
Requirements
Requires Terraform (version 1.0 or later per the example) and cloud provider credentials for the target platforms. Remote state examples reference S3 and DynamoDB for locking. Ships an executable validation script and a YAML configuration template.

Terraform Infrastructure

Table of Contents

Overview

Build scalable infrastructure as code with Terraform, managing AWS, Azure, GCP, and on-premise resources through declarative configuration, remote state, and automated provisioning.

When to Use

  • Cloud infrastructure provisioning
  • Multi-environment management (dev, staging, prod)
  • Infrastructure versioning and code review
  • Cost tracking and resource optimization
  • Disaster recovery and environment replication
  • Automated infrastructure testing
  • Cross-region deployments

Quick Start

Minimal working example:

hcl
# terraform/main.tfterraform {  required_version = ">= 1.0"
  required_providers {    aws = {      source  = "hashicorp/aws"      version = "~> 5.0"    }  }
  # Remote state configuration  backend "s3" {    bucket         = "terraform-state-prod"    key            = "prod/terraform.tfstate"    region         = "us-east-1"    encrypt        = true    dynamodb_table = "terraform-locks"  }}
provider "aws" {  region = var.aws_region
  default_tags {// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
AWS Infrastructure Module [blocked]AWS Infrastructure Module
Variables and Outputs [blocked]Variables and Outputs
Terraform Deployment Script [blocked]Terraform Deployment Script

Best Practices

✅ DO

  • Use remote state (S3, Terraform Cloud)
  • Implement state locking (DynamoDB)
  • Organize code into modules
  • Use workspaces for environments
  • Apply tags consistently
  • Use variables for flexibility
  • Implement code review before apply
  • Keep sensitive data in separate variable files

❌ DON'T

  • Store state files locally in git
  • Use hardcoded values
  • Mix environments in single state
  • Skip terraform plan review
  • Use root module for everything
  • Store secrets in code
  • Disable state locking

Source and attribution

Source:aj-geddes/useful-ai-promptsinskills/terraform-infrastructureat commit3f5182c

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal