GitOps Workflow Patterns

Coordinate Terraform and CDK infrastructure changes through Git-based PR workflows.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/nicolasmosquerar/AI-skills-for-Iac --skill gitops-workflow-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: GitOps Workflow Patterns
Source: https://github.com/nicolasmosquerar/AI-skills-for-Iac/tree/main/.agent/skills/gitops-workflow
Command: npx skills add https://github.com/nicolasmosquerar/AI-skills-for-Iac --skill gitops-workflow-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinating infrastructure changes across multiple teams is error-prone without a single source of truth, traceability, and automated guardrails.

Core Features & Use Cases

  • PR-driven plan previews for Terraform and CDK to surface changes before deployment
  • Automated plan posts to pull requests and guarded merges to production
  • OIDC-based credentials and approval gates to avoid static credentials

Quick Start

Create a PR with infrastructure changes and observe the automated plan preview posted to the PR before merging.

Frequently Asked Questions about GitOps Workflow Patterns

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

FAQPage Schema
How do I automate Terraform plan previews on pull requests?

You can automate Terraform plan previews by configuring a GitOps workflow that triggers a plan-on-PR action, posting the infrastructure changes directly to the pull request for review before merging.

Can I use OIDC credentials for CI/CD pipelines instead of static keys?

Yes, this GitOps workflow supports OIDC-based credentials for CI/CD pipelines, allowing you to securely authenticate Terraform and CDK deployments without relying on static, long-lived credentials.

What is the best way to enforce approvals for CDK infrastructure changes?

The best way to enforce approvals is using CODEOWNERS rules combined with PR-driven previews, ensuring CDK infrastructure changes require explicit reviews and guarded merges before applying to production.

How do I set up environment-specific guardrails for infrastructure as code?

You can set up environment-specific guardrails by treating Git as the single source of truth for IaC, applying protected branches and approval gates to restrict where and when Terraform apply commands execute.

Does this GitOps workflow support both Terraform and CDK?

Yes, the workflow supports both Terraform and CDK, coordinating infrastructure changes through PR-driven previews, automated plan posts, and merge-based applies across multiple cloud provisioning frameworks.