# provider-actions

Guides implementation of Terraform Actions with the Plugin Framework for operations run around resource create, update, and destroy events.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3900 installs · ★ 909
- Author: hashicorp
- License: MPL-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/hashicorp/agent-skills/tree/HEAD/plugins/terraform/skills/provider-actions/SKILL.md
- Updated: 2026-10-05
- HTML: https://affpapa.org/en/nevibecode/skills/provider-actions

## What it does

This skill guides Terraform Provider work where an imperative action must run around a resource lifecycle event. It covers first-action setup: `ProviderWithActions`, passing `ActionData` from `Configure`, a configurable action base type, and schema helpers for shared attributes.

It lays out implementation, test, and documentation locations, then covers action schemas and `Invoke`. The guide calls out mismatched framework types, missing `ElementType` on list or map fields, incorrect `Optional` and `Computed` settings, and validator imports. It also advises progress events, API timeouts through `context.WithTimeout()`, and diagnostics for failures.

Terraform Actions are described as experimental. That is a reason to check Provider support before changing schemas. The skill also points to `go build` as a check for type errors.

## Requirements
- Works with: Terraform

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill provider-actions -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/provider-actions/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/provider-actions/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill provider-actions -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/provider-actions/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill provider-actions -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/provider-actions/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install hashicorp/agent-skills provider-actions
```

2. **Manually: put the files in place**
- File: `.github/skills/provider-actions/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill provider-actions -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/hashicorp/agent-skills --path plugins/terraform/skills/provider-actions
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/provider-actions/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add hashicorp/agent-skills --skill provider-actions -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/hashicorp/agent-skills/tree/HEAD/plugins/terraform/skills/provider-actions/SKILL.md

## When to use it
- add a Terraform action around a resource lifecycle event
- prepare a Provider for its first Action
- define action fields with correct schema types
- report progress during a long-running operation
- surface API failures through Provider diagnostics

## Example prompts
- Add a Terraform Action that runs after a resource is created.
- Prepare this Provider for its first Action using `ProviderWithActions` and `ActionData`.
- Review this Action schema for field types, `ElementType`, and `Computed` settings.

## Similar
- [google-cloud-global-frontend-configuration](https://affpapa.org/en/nevibecode/skills/google-cloud-global-frontend-configuration.md) — skill · 5300 installs
- [google-cloud-solution-n-tier-serverless-web-app](https://affpapa.org/en/nevibecode/skills/google-cloud-solution-n-tier-serverless-web-app.md) — skill · 5000 installs
- [gcp-development](https://affpapa.org/en/nevibecode/skills/gcp-development.md) — skill · 937 installs
- [aws-cloud-development](https://affpapa.org/en/nevibecode/plugins/aws-cloud-development.md) — plugin · ★ 40418
- [huawei-cloud-terraform-installer](https://affpapa.org/en/nevibecode/skills/huawei-cloud-terraform-installer.md) — skill · 17400 installs
- [huawei-cloud-terraform-generator](https://affpapa.org/en/nevibecode/skills/huawei-cloud-terraform-generator.md) — skill · 17000 installs

From the same set: [hashicorp/agent-skills](https://affpapa.org/en/nevibecode/by/hashicorp/agent-skills.md) — 20 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
