Manage iacm

From harness/harness-ai · View interactive version

Manage iacm is an AI agent skill from the GitHub repository harness/harness-ai. Manage Harness Infrastructure as Code Management (IaCM) via MCP. Configure Terraform workspaces with remote state and RBAC, set up continuous drift detection with auto-remediation, design multi-tier change approval workflows, and estimate infrastructure costs before deployment. Use when asked to man

How to use this skill

Skill file

Manage IaCM

Configure Terraform workspaces, drift detection, change approval workflows, and cost estimation in Harness Infrastructure as Code Management.

Instructions

Step 1: Establish Scope

Confirm the user's org, project, cloud provider, and environments.

Call MCP tool: harness_list
Parameters:
  resource_type: "project"
  org_id: "<organization>"

Step 2: Identify the IaCM Task

Determine which workflow the user needs:

  1. Workspace and State Management -- Workspace structure, remote state, RBAC, module registry
  2. Drift Detection -- Continuous drift scanning with remediation workflows
  3. Change Approval Workflows -- Risk-based approval tiers for infrastructure changes
  4. Cost Estimation -- Pre-deployment cost impact analysis using Infracost

Step 3: Configure Workspaces and State Management

Gather from the user:

Design workspace structure:

Configure module registry:

Step 4: Set Up Drift Detection

Gather from the user:

Configure drift detection:

Remediation workflows:

Step 5: Design Change Approval Workflows

Gather risk categories from the user:

Call MCP tool: harness_create
Parameters:
  resource_type: "pipeline"
  org_id: "<organization>"
  project_id: "<project>"
  body:
    pipeline:
      name: "terraform-change-approval"
      identifier: "terraform_change_approval"
      stages:
        - stage:
            name: Plan
            type: CI
            spec:
              # terraform plan + output change summary
        - stage:
            name: Cost Estimate
            type: CI
            spec:
              # infracost diff
        - stage:
            name: Approval
            type: Approval
            spec:
              # risk-based approval routing
        - stage:
            name: Apply
            type: CI
            spec:
              # terraform apply

Step 6: Estimate Infrastructure Costs

When asked for cost estimation:

Present a cost report with:

Examples

Performance Notes

Troubleshooting

State Locking Conflicts

Drift Detection False Positives

Cost Estimation Missing Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.