provider-actions

Define schema-driven lifecycle actions for Terraform providers using the Plugin Framework.

Updated Jul 30, 2024
One-click install
npx skills add https://github.com/twidxuga/dotfiles --skill provider-actions-twidxuga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: provider-actions
Source: https://github.com/twidxuga/dotfiles/tree/main/opencode/dot-config/opencode/skills/terraform-provider-actions
Command: npx skills add https://github.com/twidxuga/dotfiles --skill provider-actions-twidxuga

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Imperative operations are often required during Terraform resource lifecycles (before/after create, update, or destroy). This skill provides a structured way to implement those actions using the Terraform Plugin Framework, enabling deterministic lifecycle hooks and safer provider behavior.

Core Features & Use Cases

  • Schema-driven action definitions for lifecycle events
  • Imperative operations executed during before/after lifecycle hooks
  • Clear error handling, progress reporting, and timeout management
  • Use cases include resource creation validation, post-create data enrichment, and controlled updates/destroys

Quick Start

Configure a lifecycle action in your provider to execute before or after resource events.

Frequently Asked Questions about provider-actions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trigger imperative operations during a Terraform resource lifecycle?

You can trigger imperative operations during a Terraform resource lifecycle by implementing provider actions. These actions execute deterministic operations before or after resource create, update, and destroy events using the Terraform Plugin Framework.

What are Terraform provider actions used for?

Terraform provider actions are used to execute imperative operations during resource lifecycle events. They provide a structured way to handle before and after hooks for resource creation, updates, and destruction, enabling safer provider behavior.

Does the Terraform Plugin Framework support schema-driven validation for lifecycle hooks?

Yes, the Terraform Plugin Framework supports schema-driven validation for lifecycle hooks. You can define actions with a configurable schema to validate resource creation, execute post-create data enrichment, and manage controlled updates.

How do I handle errors and timeouts in custom Terraform provider lifecycle actions?

You handle errors and timeouts in custom Terraform provider lifecycle actions by using the built-in robust error mapping, progress reporting, and timeout management features. This ensures safer provider behavior during imperative lifecycle operations.

Can I run validation logic before destroying a Terraform resource?

Yes, you can run validation logic before destroying a Terraform resource by configuring a provider action. This executes an imperative operation during the before destroy lifecycle hook using a schema-driven action definition.