Back to Skills

provider-actions

Implement Terraform Provider actions using the Plugin Framework. Use when developing imperative operations that execute at lifecycle events (before/after create, update, destroy).

680stars77forksUpdated 6/22/2026

Security Assessment

Safe(100/100)
Security Score100/100

About provider-actions

provider-actions is an implementation-guide skill for building Terraform Provider Actions with the Terraform Plugin Framework. Terraform Actions are an experimental capability that let a provider perform imperative operations at specific points in the resource lifecycle — before or after create, update, and destroy. The skill addresses the practical difficulty of authoring these actions correctly: the framework has precise schema, typing, and registration conventions that are easy to get wrong on a first draft.

It lays out the standard service-package file structure (the action implementation, its tests, and the auto-generated service registration), the website documentation layout, and the changelog entry format. It then details the schema definition pattern and the Invoke method that holds the action logic, and calls out the most common mistakes — framework versus plugin-framework type mismatches, List/Map attributes missing an ElementType, attributes with defaults needing both Optional and Computed, and validator import errors — backed by a pre-submission schema validation checklist. Runtime concerns are covered as well: progress reporting for long operations, configurable timeouts driven by context, diagnostics-based error handling with clear messages, provider SDK client integration with pagination and retries, and input validation.

It targets Terraform provider engineers adding imperative lifecycle actions to a provider codebase who want code that compiles cleanly and matches framework conventions. It is most useful during the implementation and review of a new action, acting as a reference for schema correctness, error handling, and the surrounding documentation and changelog artifacts.

FAQ

When should I use this skill?

Use it when implementing Terraform Provider Actions — imperative operations that run at lifecycle events (before/after create, update, and destroy) — with the Terraform Plugin Framework.

Which framework and language does it assume?

It targets the Terraform Plugin Framework with action implementations written in Go, following the standard internal/service/<service> package layout.

What are the most common mistakes it helps avoid?

Framework versus plugin-framework type mismatches, List/Map attributes missing an ElementType, forgetting that defaulted attributes must be both Optional and Computed, and missing or incorrect validator imports. It includes a schema validation checklist to catch these before submitting.

What runtime requirements does it cover?

Progress reporting for long-running operations, configurable timeout handling via context, diagnostics-based error handling, provider SDK client integration with pagination and retry for transient failures, and parameter validation.

Does it generate the provider code for me?

No. It is a conventions and implementation reference, not a code generator — you still write the Go action code. Note also that Terraform Actions are experimental, so the APIs may change.

Install provider-actions

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill