manage-iacm
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "manage-iacm" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-cb77543c811158b7e0af0f891234ceb606b90bd62a9cc4cfe78139bdf140521d. Verify the upstream source and version against https://github.com/harness/harness-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Manage Harness Infrastructure-as-Code (IaCM) via MCP: configure Terraform workspaces with remote state and RBAC, set up continuous drift detection with automated remediation, design multi-level change approval workflows, and estimate infrastructure costs before deployment. Intended for managing Terraform workspaces, detecting infrastructure drift, setting approval workflows, or estimating Terraform costs. Not for creating Harness infrastructure definitions or OPA policies.
Introduction source: third_party · harness · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Not specified in the source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: manage-iacm
description: >-
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 manage Terraform workspaces, detect infrastructure drift, set up approval
workflows for infrastructure changes, or estimate Terraform costs. Do NOT use for creating
Harness infrastructure definitions (use create-infrastructure instead) or OPA policies
(use create-policy instead). Trigger phrases: terraform, workspace, drift detection,
infrastructure cost, IaCM, state management, change approval, terraform plan, infracost,
infrastructure governance.
metadata:
author: Harness
version: 1.0.0
mcp-server: harness-mcp-v2
license: Apache-2.0
compatibility: Requires Harness MCP v2 server (harness-mcp-v2)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:
- Workspace and State Management -- Workspace structure, remote state, RBAC, module registry
- Drift Detection -- Continuous drift scanning with remediation workflows
- Change Approval Workflows -- Risk-based approval tiers for infrastructure changes
- Cost Estimation -- Pre-deployment cost impact analysis using Infracost
Step 3: Configure Workspaces and State Management
Gather from the user:
- Cloud provider (AWS, GCP, Azure, multi-cloud)
- Environments to manage (dev, staging, prod)
- Workspace naming convention (e.g., {project}-{env}-{region})
- State backend preference (S3+DynamoDB, GCS+Firestore, Azure Blob, Harness built-in)
Design workspace structure:
- One workspace per environment per account
- Remote state backend with encryption at rest and state locking
- State backup with versioning and configurable retention
- RBAC: Developer=plan only, Senior Dev=plan+apply to dev, Team Lead=staging, DevOps=all with prod approval
Configure module registry:
- Semantic versioning for modules
- Security scanning before module publication (Checkov, tfsec, Terrascan)
- Approval workflow for new module versions
Step 4: Set Up Drift Detection
Gather from the user:
- Environments to monitor
- Scan frequency (hourly, every 6 hours, daily)
- Resources to exclude from drift scanning
Configure drift detection:
- Compare actual cloud resources against Terraform state on schedule
- Detect additions, deletions, and modifications outside Terraform control
- Classify drift by severity: critical (security group changes, IAM), warning (tags, descriptions), info (metadata)
Remediation workflows:
- Auto-remediate low-risk drift (tag corrections, description updates)
- Alert and create ticket for medium-risk drift
- Page on-call for critical drift (security-related changes)
Step 5: Design Change Approval Workflows
Gather risk categories from the user:
- Low risk (e.g., tag changes, scaling adjustments) -- auto-apply after peer review
- Medium risk (e.g., new resources, config changes) -- team lead approval
- High risk (e.g., security groups, IAM, database changes) -- security team + CAB approval
- Emergency (break-glass) -- post-implementation review required
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:
- Identify the workspace and pending Terraform changes (PR or plan output)
- Run Infracost analysis on the plan
Present a cost report with:
- Current monthly cost vs. projected monthly cost
- Per-resource cost breakdown for new/modified resources
- Cost optimization recommendations (right-sizing, reserved instances)
- Budget impact assessment
Examples
- "Set up Terraform workspaces for our AWS environments" -- Configure workspace structure with state management and RBAC
- "Enable drift detection for production infrastructure" -- Set up scheduled scanning with severity classification and remediation
- "Create an approval workflow for infrastructure changes" -- Design risk-based approval tiers with security review for high-risk changes
- "How much will this Terraform change cost?" -- Run Infracost analysis and present cost impact report
- "Configure our Terraform module registry" -- Set up versioned module registry with security scanning
Performance Notes
- Workspace naming conventions should be established early -- renaming workspaces requires state migration.
- Drift detection scans should avoid peak hours to minimize API rate limit conflicts.
- Cost estimation accuracy depends on Infracost having pricing data for all resource types in use.
- Change approval workflows should include a break-glass path for emergencies -- blocking all changes can be as dangerous as no controls.
Troubleshooting
State Locking Conflicts
- Check for stuck locks from failed runs -- use
terraform force-unlockcautiously - Verify the state backend (DynamoDB, Firestore) is accessible from the runner
Drift Detection False Positives
- Exclude resources managed by auto-scaling groups or Kubernetes operators
- Add ignore rules for metadata fields that change frequently (last-modified timestamps)
- Verify the scan is running against the correct workspace/state file
Cost Estimation Missing Resources
- Infracost may not support all resource types -- check supported resource list
- Ensure the Terraform plan output includes all changed resources
- Custom modules may need explicit cost annotations
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 Harness IaCM 的完整管理能力,包括 Terraform 工作区配置、漂移检测、变更审批工作流和成本估算
- 适用于广泛的基础设施即代码管理场景,具有明确的实用价值
Highlights
- 触发词覆盖完整且边界清晰,包括 terraform、workspace、drift detection、infrastructure cost 等关键术语
- 明确排除了不相关的功能(如创建 Harness infrastructure definitions 或 OPA policies)
Highlights
- Phase/步骤清晰(Step 1-6),每个步骤都有明确的目标和操作指导
- 包含端到端示例和性能注意事项,frontmatter 完整规范
Highlights
- 工具来源明确(Harness MCP v2),参数正确,覆盖主要异常场景
- 包含详细的故障排除指南,涵盖状态锁定冲突、漂移检测误报等常见问题
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Cloud changes and possible charges
Preview changes and verify account, region, permissions and costs. Confirm creation, deployment or deletion separately.
Mentioned in main document · lines 121
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.