Skip to content
Agentmart
Submit a tool

hcp-terraform-deploy

Skill for planning, applying, and monitoring Terraform deployment.

Skill by joatmon08

IndexedMIT★ 7
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/joatmon08-hcp-terraform-deploy

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Skill for planning, applying, and monitoring Terraform deployment. Use this skill any time someone needs to deploy to HCP Terraform, trigger a Terraform run, apply infrastructure changes, or monitor plans and applies through tfctl.

Use cases: devops

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/hcp-terraform-deploy

What's inside

Skill name
hcp-terraform-deploy
Description
Skill for planning, applying, and monitoring Terraform deployment. Use this skill any time someone needs to deploy to HCP Terraform, trigger a Terraform run, apply infrastructure changes, or monitor plans and applies through tfctl.
License
MIT
Instructions
60 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions call the network

Agent Skills spec issues

  • body: contains an absolute path from the author's machine

Files (2)

  • SKILL.md
  • check-run-status.sh · scripts/

SKILL.md (first lines)

# HCP Terraform Deploy

## Overview

Follow a to-do list to start a run, review a plan, and apply the changes to
a Terraform workspace with `tfctl`.

1. Verify the HCP Terraform organization and workspace exist using `tfctl`.
2. Start a run based on the organization and workspace name. Note the run ID returned.
3. Monitor the plan by running the skill's monitoring script at `scripts/check-run-status.sh <run-id> 60` — this polls every 60 seconds until the plan reaches a terminal state.
4. If the plan succeeds, approve the apply with the comment "Approved with IBM Bob".
5. Monitor the apply by running `scripts/check-run-status.sh <run-id> 180` — this polls every 3 minutes until the apply reaches a terminal state.
6. If the apply succeeds, finish the task.

If any of these steps fail in an error, stop and debug using the steps below before waiting for review.

## Monitoring Script

The monitoring script lives inside this skill directory. Always reference it by its full skill path — do **not** copy it into the repository.

```bash
# Full path to the script (never copy to repo)
/Users/rosemary/.bob/skills/hcp-terraform-deploy/scripts/check-run-status.sh

# Poll plan status every 60 seconds (up to 10 checks)
bash /Users/rosemary/.bob/skills/hcp-terraform-deploy/scripts/check-run-status.sh run-ABC123 60

# Poll apply status every 3 minutes (up to 10 checks)
bash /Users/rosemary/.bob/skills/hcp-terraform-deploy/scripts/check-run-status.sh run-ABC123 180
```

Exit codes returned by the script:
- `0` — run reached a successful terminal state (`applied`, `planned`, `planned_and_finished`)
- `1` — run failed or was cancelled; apply logs are printed automatically
- `2` — max checks reached without a terminal state; check HCP Terraform UI

## Debugging a Failed Plan

When the monitoring script exits with code `1` (errored), use these `tfctl` calls to diagnose the failure.

### 1. Get the plan and apply IDs for the run

```bash
source tfctl.env && tfctl api /runs/<run-id> --jq '.data.relationships | {plan: .plan.data.id, apply: .apply.data.id}'
```

### 2. Get the plan log URL

```bash
source tfctl.env && tfctl api /plans/<plan-id> --jq '.data.attributes.["log-read-url"]'
```

### 3. Fetch and grep the plan log for errors

```bash
source tfctl.env && tfctl api /plans/<plan-id> --jq '.data.attributes.["log-read-url"]' | xargs curl -s | grep -E '"@level":"error"|Error' | head -30
```

This surfaces Terraform diagnostic messages (e.g. `Cannot import non-existent remote object`) that explain exactly why the plan failed.

From joatmon08/platform-infrastructure-skills, MIT.

Signals

Stars
7
Forks
2
Open issues
0
Last commit (this folder)
Jul 23, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from joatmon08

Cite this page

hcp-terraform-deploy skill. Agent Mart. https://agentmart.dev/skills/joatmon08-hcp-terraform-deploy (last updated 2026-10-24)