> new-terraform-provider
Use this when scaffolding a new Terraform provider.
curl "https://skillshub.wtf/hashicorp/agent-skills/new-terraform-provider?format=md"To scaffold a new Terraform provider with Plugin Framework:
- If I am already in a Terraform provider workspace, then confirm that I want to create a new workspace. If I do not want to create a new workspace, then skip all remaining steps.
- Create a new workspace root directory. The root directory name should be prefixed with "terraform-provider-". Perform all subsequent steps in this new workspace.
- Initialize a new Go module..
- Run
go get -u github.com/hashicorp/terraform-plugin-framework@latest. - Write a main.go file that follows the example.
- Remove TODO comments from
main.go - Run
go mod tidy - Run
go build -o /dev/null - Run
go test ./...
> related_skills --same-repo
> provider-test-patterns
Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework. Covers test structure, TestCase/TestStep fields, ConfigStateChecks with custom statecheck.StateCheck implementations, plan checks, CompareValue for cross-step assertions, config helpers, import testing with ImportStateKind, sweepers, and scenario patterns (basic, update, disappears, validation, regression), and ephemeral resource testing with the echoprovider package. Use when writing, reviewing
> run-acceptance-tests
Guide for running acceptance tests for a Terraform provider. Use this when asked to run an acceptance test or to run a test with the prefix `TestAcc`.
> provider-resources
Implement Terraform Provider resources and data sources using the Plugin Framework. Use when developing CRUD operations, schema design, state management, and acceptance testing for provider resources.
> 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).