agentsclimarketplace

Managing iacm

Skill pvnarp/harness-agentic-skills/skills/harness/managing-iacm

Browse Harness Infrastructure as Code Management (IACM) workspaces, modules, and resources via MCP. List Terraform-managed workspaces by status (active, drifted, apply_needed, failed), inspect provisioned resources, view per-execution cost breakdowns, and audit resource changes across plan/apply/destroy runs. Use when asked about IaC, IACM, Terraform workspaces, drift detection, infrastructure costs, module registry, or resource changes. Trigger phrases: IACM, IaC, Terraform workspace, drift detection, apply needed, module registry, infrastructure costs, resource changes, plan/apply/destroy history.From its SKILL.md

Install
npx -y skills add pvnarp/harness-agentic-skills --skill managing-iacm

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.2 KB, as published. Nobody here has run it

Manage IACM (Infrastructure as Code Management)

What this skill uses

Harness MCP tools: harness:harness_get, harness:harness_list Resource types: iacm_activity_resource_change, iacm_module, iacm_resource, iacm_workspace, iacm_workspace_costs

Browse Terraform-managed workspaces, the module registry, and resource activity in Harness IACM. All operations are read-only via MCP today.

Resource map

Resource typePurpose
iacm_workspaceTerraform workspaces (one per Terraform-managed environment). Filterable by status: active, inactive, apply_needed, drifted, failed, provisioning, destroying.
iacm_resourceTerraform resources provisioned within a workspace
iacm_moduleModule registry entries
iacm_workspace_costsPer-execution cost breakdown for a workspace
iacm_activity_resource_changeResource change history from plan/apply/destroy runs

Instructions

Step 1: List workspaces

Pagination is 1-based, max 30 per page. Always check has_more and paginate to get totals.

Call MCP tool: harness:harness_list
Parameters:
  resource_type: "iacm_workspace"
  org_id: "<org>"
  project_id: "<project>"
  filters:
    status: "drifted"      # optional - active|inactive|apply_needed|drifted|failed|provisioning|destroying
    page: 1
    size: 30

The response includes:

  • items: workspace objects
  • page_count: items on this page only (not the total)
  • has_more: true -> call again with page+1

To answer "how many workspaces are there?", paginate until has_more=false and sum page_count.

Step 2: Get a single workspace

Call MCP tool: harness:harness_get
Parameters:
  resource_type: "iacm_workspace"
  resource_id: "<workspace_id>"
  org_id: "<org>"
  project_id: "<project>"

Returns: identifier, name, status, last_run info, variables, cost_summary, project_id.

Step 3: List provisioned resources in a workspace

Call MCP tool: harness:harness_list
Parameters:
  resource_type: "iacm_resource"
  filters:
    workspace_id: "<workspace_id>"

Step 4: Per-workspace cost breakdown

Call MCP tool: harness:harness_list
Parameters:
  resource_type: "iacm_workspace_costs"
  filters:
    workspace_id: "<workspace_id>"

Step 5: Audit resource change history

Plan / apply / destroy diffs:

Call MCP tool: harness:harness_list
Parameters:
  resource_type: "iacm_activity_resource_change"
  filters:
    workspace_id: "<workspace_id>"

Step 6: Module registry

Call MCP tool: harness:harness_list
Parameters:
  resource_type: "iacm_module"
  org_id: "<org>"
  project_id: "<project>"
Call MCP tool: harness:harness_get
Parameters:
  resource_type: "iacm_module"
  resource_id: "<module_id>"

Common questions and patterns

"Which workspaces are drifted?"

harness:harness_list iacm_workspace filters.status=drifted

"What's our Terraform-managed infrastructure spend?"

Sum cost_summary across all workspaces (paginate first), or fetch iacm_workspace_costs per workspace for time-series detail.

"What changed in the last apply on workspace X?"

harness:harness_list iacm_activity_resource_change filters.workspace_id=X

Returns added / changed / removed resources from each plan-apply cycle.

"Find workspaces that need apply"

harness:harness_list iacm_workspace filters.status=apply_needed

These have pending plan output that hasn't been applied.

Examples

  • "Show all drifted Terraform workspaces" -> harness:harness_list iacm_workspace filters.status=drifted
  • "What does workspace X cost per run?" -> harness:harness_list iacm_workspace_costs filters.workspace_id=X
  • "Which modules are registered?" -> harness:harness_list iacm_module
  • "Show resource changes in workspace platform-prod" -> harness:harness_list iacm_activity_resource_change filters.workspace_id=platform-prod
  • "How many failing workspaces do we have?" -> paginate harness:harness_list iacm_workspace filters.status=failed until has_more=false

Related skills

Prerequisites (skills typically run before this one):

Composes with (skills commonly invoked together):

Follow-ups (skills commonly chained after this one):

Performance Notes

  • Pagination is 1-based and capped at 30 per page. page_count is per-page, not total.
  • For org-wide rollups, paginate fully before reporting numbers.
  • Cost breakdowns can be large for active workspaces; narrow with workspace_id when possible.

Troubleshooting

  • "page_count is small but actual count is large" - that's page_count for this page only; paginate by has_more.
  • No drift detected when expected - Harness IACM detects drift on a schedule, not in real time. Check the workspace's last_run timestamp.
  • Workspace lookup returns 404 - workspace identifiers are project-scoped. Verify org_id + project_id match.
  • "workspace_id required" on list - iacm_resource, iacm_workspace_costs, iacm_activity_resource_change all require filters.workspace_id. Use harness:harness_list iacm_workspace first to find IDs.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.