terraform
Terraform infrastructure as code including modules, state management, and cloud provisioning. Activate for tf files, IaC, infrastructure provisioning, and cloud resource management.
Works with
---
name: terraform
description: Terraform infrastructure as code including modules, state management, and cloud provisioning. Activate for tf files, IaC, infrastructure provisioning, and cloud resource management.
license: MIT
---
# Terraform Skill
Provides comprehensive Terraform infrastructure as code capabilities for the Golden Armada AI Agent Fleet Platform.
## When to Use This Skill
Activate this skill when working with:
- Infrastructure provisioning
- Terraform modules and configurations
- State management
- Cloud resource definitions
- Multi-environment deployments
## Quick Reference
### Common Commands
\`\`\`bash
# Initialize
terraform init
terraform init -upgrade
# Plan
terraform plan
terraform plan -out=tfplan
terraform plan -var="environment=prod"
# Apply
terraform apply
terraform apply tfplan
terraform apply -auto-approve
# Destroy
terraform destroy
terraform destroy -target=aws_instance.example
# State
terraform state list
terraform state show <resource>
terraform state mv <source> <destination>
terraform state rm <resource>
# Workspace
terraform workspace list
terraform workspace new dev
terraform workspace select prod
# Format/Validate
terraform fmt -recursive
terraform validate
\`\`\`
## Project Structure
\`\`\`
terraform/
├── main.tf
├── variables.tf
├── outputs.tf
├── providers.tf
├── versions.tf
├── terraform.tfvars
├── environments/
│ ├── dev.tfvars
│ └── prod.tfvars
└── modules/
├── networking/
├── compute/
└── database/
\`\`\`
## Provider Configuration
\`\`\`hcl
# versions.tf
terraform {
required_version = ">= 1.0.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "~> 2.0"
}
}
backend "s3" {
bucket = "golden-armada-terraform-state"
key = "state/terraform.tfstate"
region = "us-west-2"
encrypt = true
dynamodb_table = "terraform-locks"
}
}
# providers.tf
provider "aws" {
region = var.aws_region
default_tags {
tags = {
Project = "golden-armada"
Environment = var.environment
ManagedBy = "terraform"
}
}
}
\`\`\`
## Variables
\`\`\`hcl
# variables.tf
variable "environment" {
description = "Environment name"
type = string
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "Environment must be dev, staging, or prod."
}
}
variable "instance_count" {
description = "Number of instances"
type = number
default = 2
}
variable "tags" {
description = "Resource tags"
type = map(string)
default = {}
}
# terraform.tfvars
environment = "dev"
instance_count = 2
\`\`\`
## Module Example
\`\`\`hcl
# modules/eks-cluster/main.tf
resource "aws_eks_cluster" "main" {
name = "${var.project}-${var.environment}"
role_arn = aws_iam_role.cluster.arn
version = var.kubernetes_version
vpc_config {
subnet_ids = var.subnet_ids
endpoint_private_access = true
endpoint_public_access = var.public_access
}
tags = var.tags
}
# modules/eks-cluster/variables.tf
variable "project" {
type = string
}
variable "environment" {
type = string
}
variable "kubernetes_version" {
type = string
default = "1.28"
}
# Usage
module "eks" {
source = "./modules/eks-cluster"
project = "golden-armada"
environment = var.environment
subnet_ids = module.vpc.private_subnets
kubernetes_version = "1.28"
tags = local.tags
}
\`\`\`
## Best Practices
1. **State Management**: Use remote state with locking
2. **Modules**: Create reusable modules for common patterns
3. **Workspaces**: Separate environments using workspaces
4. **Variables**: Use tfvars files per environment
5. **Outputs**: Export important values for other modules
6. **Tagging**: Apply consistent tags to all resourcesMore DevOps & Infrastructure skills
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
appinsights-instrumentation
microsoft/azure-skills
Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices.
azure-storage
microsoft/azure-skills
Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake. Answers questions about storage access tiers (hot, cool, cold, archive), when to use each tier, and tier comparison. Provides object storage, SMB file shares, async messaging, NoSQL key-value, and big data analytics. Includes lifecycle management. USE FOR: blob storage, file shares, queue storage, table storage, data lake, upload files, download blobs, storage accounts, access tiers, storage tiers, hot cool cold archive, storage tier comparison, when to use storage tiers, lifecycle management, Azure Storage concepts. DO NOT USE FOR: SQL databases, Cosmos DB (use azure-prepare), messaging with Event Hubs or Service Bus (use azure-messaging).

