create-infra-pipeline

Generate Azure DevOps pipeline YAML for Terraform and Terragrunt deployments.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/omattsson/iac-bootstrap --skill create-infra-pipeline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-infra-pipeline
Source: https://github.com/omattsson/iac-bootstrap/tree/main/examples/azure-terragrunt/.github/skills/create-infra-pipeline
Command: npx skills add https://github.com/omattsson/iac-bootstrap --skill create-infra-pipeline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually writing Azure DevOps pipeline YAML for Terraform and Terragrunt infrastructure deployments is time-consuming and prone to consistency errors, leading to unreliable CI/CD workflows for infrastructure changes.

Core Features & Use Cases

  • Standardized plan/apply pipelines: Generates pre-configured two-stage pipelines with an always-running plan stage that publishes artifacts, and an apply stage restricted to protected branches with mandatory approval gates.
  • Drift detection support: Includes built-in scheduled drift check configurations to identify unplanned infrastructure changes on a regular cadence.
  • Best-practice alignment: Follows established conventions including shared template repository reuse, 20-minute lock timeouts, and secure Azure Managed Service Identity authentication.
  • Use Case: A DevOps team managing multiple Terragrunt components across Azure environments can use this skill to generate consistent, compliant pipelines for each component in seconds, rather than maintaining hand-written YAML for every deployment workflow.

Quick Start

Use the create-infra-pipeline skill to generate a complete Azure DevOps pipeline YAML for your Terraform component's development environment with plan/apply stages and weekday drift detection enabled.

Frequently Asked Questions about create-infra-pipeline

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

FAQPage Schema
How do I set up an Azure DevOps pipeline for Terraform deployments?

To set up an Azure DevOps pipeline for Terraform, you need a YAML configuration with separate plan and apply stages. This generates standardized pipelines where the plan stage always runs and publishes artifacts, while the apply stage is restricted to protected branches with mandatory approval gates.

Can I automate Terragrunt CI/CD pipelines in Azure DevOps?

Yes, you can automate Terragrunt CI/CD pipelines in Azure DevOps by generating YAML configurations that include a 20-minute lock timeout convention. This ensures consistent deployment workflows across multiple Terragrunt components without manually writing pipeline code for each one.

What is infrastructure drift detection and how does it work in CI/CD?

Infrastructure drift detection identifies unplanned changes in your infrastructure by running scheduled Terraform plan checks on a regular cadence. In a CI/CD pipeline, this is configured as a scheduled job that compares your actual cloud state against your infrastructure-as-code configuration.

Does this pipeline setup support Azure authentication for Terraform?

Yes, the generated pipeline setup supports Azure authentication for Terraform using secure Azure Managed Service Identity. This integrates directly into the pipeline YAML to authenticate Terraform and Terragrunt deployments without storing manual credentials.

How do I add approval gates to protected branches in Azure DevOps YAML?

To add approval gates to protected branches in Azure DevOps YAML, configure the apply stage with branch restrictions and mandatory approvals. This ensures infrastructure changes cannot be applied without manual review on designated protected branches.

What is the best way to standardize Terraform pipelines across multiple environments?

The best way to standardize Terraform pipelines across multiple environments is to use shared template repositories that generate consistent YAML configurations. This approach applies uniform plan and apply stages, drift detection schedules, and authentication methods across all infrastructure components.