Infrastructure as Code Skill

Implements declarative infrastructure provisioning patterns using Terraform, Bicep, Pulumi, and CloudFormation.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/fabioc-aloha/BrainBenchmark --skill infrastructure-as-code-skill-fabioc-aloha
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Infrastructure as Code Skill
Source: https://github.com/fabioc-aloha/BrainBenchmark/tree/main/.github/skills/infrastructure-as-code
Command: npx skills add https://github.com/fabioc-aloha/BrainBenchmark --skill infrastructure-as-code-skill-fabioc-aloha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Defining and managing cloud infrastructure manually leads to configuration drift, inconsistent environments, and untracked changes. This Skill provides declarative IaC patterns so infrastructure is versioned, repeatable, and reviewable through code. ## Core Features & Use Cases - Multi-Tool Patterns: Ready-to-use project structures, modules, and state management examples for Terraform, Bicep, Pulumi, and CloudFormation. - Testing & CI/CD: Static analysis (tflint, tfsec, checkov), unit tests, and GitHub Actions plan/apply pipelines following GitOps workflows. - Best Practices & Anti-Patterns: Naming conventions, tagging strategies, secrets management via Key Vault, and common mistakes to avoid. - Use Case: You need to provision an Azure App Service across dev, staging, and prod. Use the Bicep module pattern with environment-specific parameters, wire it into a GitHub Actions pipeline, and validate with Bicep MCP diagnostics before deployment. ## Quick Start Ask the AI to generate a Terraform module for an Azure App Service with remote state, tagging, and a GitHub Actions plan/apply pipeline.

Frequently Asked Questions about Infrastructure as Code Skill

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

FAQPage Schema
How do I structure a Terraform project for multiple environments?▼

Use separate directories per environment (dev, staging, prod) with their own backend and tfvars files, plus a shared modules directory for reusable components. Each environment gets its own remote state key to isolate changes and enable independent deployments.

Bicep vs Terraform: which should I use for Azure infrastructure?▼

Bicep offers day-zero Azure support, Azure-managed state, and a simpler syntax, making it ideal for Azure-only workloads. Terraform is better for multi-cloud scenarios and has a larger module ecosystem, but requires self-managed state.

How do I manage secrets in Terraform without committing them?▼

Reference secrets from Azure Key Vault using data sources instead of hard-coding values or storing them in tfvars files. Combine this with CI/CD pipeline secrets and managed identities so credentials never appear in version control.

Does Terraform support testing infrastructure code before deployment?▼

Yes, Terraform supports validation through terraform validate, tflint, tfsec, and checkov for static analysis, plus native test files using the .tftest.hcl format for plan-based assertions. Integration tests can deploy to ephemeral environments and destroy them afterward.

Why does Terraform state get corrupted in team environments?▼

State corruption typically happens when multiple people apply changes concurrently without state locking, or when state files are stored locally. Use remote backends with locking enabled, such as Azure Storage or S3 with DynamoDB, and never edit state manually.

When should I use Pulumi instead of Terraform or Bicep?▼

Pulumi fits teams that prefer TypeScript, Python, or Go over HCL and need complex logic like loops, conditionals, or API calls in their infrastructure code. For simpler needs or teams already experienced with Terraform, HCL-based tools are usually a better fit.