Agent skill · hashicorp
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).
What it needs
About 8k tokens when loaded.
What this skill does
Terraform Provider Actions Implementation Guide Overview Terraform Actions enable imperative operations during the Terraform lifecycle. Actions are experimental features that allow performing provider operations at specific lifecycle events (before/after create, update, destroy). References: Terraform Plugin Framework Terraform Plugin Framework Actions First Action Setup When adding the first action to a provider that has never had one, several one-time scaffolding steps are required: 1. Implement ProviderWithActions — add an Actions() method to the provider that returns []func() action.Action. 2. Set ActionData in Configure — the provider's Configure method must set resp.ActionData = v alongside the existing ResourceData, DataSourceData, and EphemeralResourceData assignments. 3. Create ActionWithConfigure base type — if the provider uses embedded base types (e.g. ResourceWithConfigure), create an equivalent ActionWithConfigure type implementing action.ConfigureRequest / action.ConfigureResponse. 4. Action-schema helper variants — if the provider injects common schema attributes (e.g. namespace) via helper functions, action-schema variants are needed since action/schema types differ from resource/schema types. File Structure Most providers keep actions alongside resources in the provider package: (Large multi-service providers use internal/service/<service>/ packages instead — follow the target repository's layout.) Documentation lives with the other generated docs: (Some older, large providers hand-write website/docs/actions/<name>.html.markdown instead — match the repo.) Action Schema Definition Actions use the Terraform Plugin Framework with a standard schema pattern: Common Schema Issues Pay special attention to the schema definition - common issues after a first draft: 1. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills hashicorp/provider-actions--2dd014