infrastructure-as-code

Generates Terraform or Pulumi infrastructure with pinned providers, remote state, and CI pipelines.

Updated May 21, 2026
One-click install
npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill infrastructure-as-code-cagesthrottleus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: infrastructure-as-code
Source: https://github.com/CagesThrottleUs/private-ai-harness/tree/main/skills/infrastructure-as-code
Command: npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill infrastructure-as-code-cagesthrottleus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually provisioned cloud infrastructure drifts from intent, cannot be audited, and cannot be reproduced when a new environment is needed. This Skill replaces ClickOps with version-controlled Terraform or Pulumi code that is reviewable, repeatable, and security-scanned before apply. ## Core Features & Use Cases - Structured Terraform scaffolding: Generates versions.tf with pinned providers, backend.tf with remote state and locking (S3+DynamoDB, GCS, or Azure Blob), typed variables.tf, outputs.tf, and per-environment .tfvars files. - CI plan/apply pipeline: Adds GitHub Actions jobs that run tfsec security scans, produce reviewable plans on pull requests, and apply on merge to main with environment-gated production deploys. - Golden-path modules: Supports consuming curated, versioned modules from a private registry so services inherit compliant defaults (encryption, tagging, network policy) instead of hand-writing bespoke HCL. - Use Case: A service needs a new RDS database, S3 bucket, and SQS queue. The Skill generates the full infra/ directory, a staging/production tfvars split, and a CI pipeline, then runs the iac-reviewer agent before committing. ## Quick Start Ask the AI to provision the infrastructure for a new service using Terraform with remote state, a tfsec scan, and a staging/production environment split.

Frequently Asked Questions about infrastructure-as-code

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

FAQPage Schema
How do I set up Terraform remote state with locking?

Configure a backend block in backend.tf pointing to shared storage: S3 with a DynamoDB lock table on AWS, GCS on Google Cloud, or Azure Blob Storage. Remote state lets the team share state and prevents concurrent applies from corrupting it.

Terraform vs Pulumi for infrastructure as code?

Terraform is the default for ops-oriented teams needing the widest provider ecosystem and HCL. Pulumi suits developer-heavy teams that prefer TypeScript, Python, or Go, want encrypted secrets in state, and need unit tests for infrastructure.

How do I scan Terraform code for security issues in CI?

Run tfsec as a CI step before terraform plan, outputting SARIF results uploaded to GitHub code scanning. Checkov is an alternative that also covers CloudFormation and Kubernetes manifests.

Should Terraform secrets go in tfvars files?

No. Never put secrets in .tfvars files. Mark sensitive variables with sensitive = true and inject values via TF_VAR_* environment variables sourced from CI secrets so they never appear in plan output or logs.

When should I skip writing infrastructure as code?

Skip IaC for application code changes with no infrastructure impact, or features that reuse existing databases, queues, and compute with no new resources. Confirm with the team before assuming no new resources are needed.