new-terraform-provider
hashicorp/agent-skills
Scaffold a new Terraform provider project with Plugin Framework boilerplate.
What is new-terraform-provider?
Creates the workspace layout, Go module setup, main.go server, and provider.go schema for a new Terraform provider. Use this when starting a terraform-provider-* project for a new API or infrastructure platform.
- Generates terraform-provider-* directory structure with proper naming conventions
- Initializes Go module and fetches terraform-plugin-framework dependency
- Creates main.go with provider server setup following HashiCorp patterns
- Generates internal/provider/provider.go with schema and Configure method
- Sets up credential resolution via explicit config and environment variables
- Validates the scaffold with go build and go test
How to install new-terraform-provider
npx skills add https://github.com/hashicorp/agent-skills --skill new-terraform-provider- Go 1.x installed and configured
- Basic familiarity with Terraform provider concepts
- Target API documentation or endpoint details
How to use new-terraform-provider
- 1.Confirm you want to create a new workspace if already in a provider project
- 2.Create a new directory prefixed with 'terraform-provider-'
- 3.The skill initializes the Go module and fetches terraform-plugin-framework
- 4.Review and customize the generated main.go and internal/provider/provider.go files
- 5.Rename 'demo' provider references and DEMO_* environment variables to match your API
- 6.Remove TODO comments from generated files
- 7.Run 'go mod tidy' to finalize dependencies
- 8.Run 'go build -o /dev/null' to verify compilation
Use cases
- Starting a new Terraform provider for a custom API or SaaS platform
- Scaffolding provider boilerplate before implementing resources and data sources
- Setting up the foundation for a terraform-provider-* open-source project
- Creating a provider that manages infrastructure on a proprietary platform
- Establishing the correct Plugin Framework structure for HashiCorp compatibility
- Infrastructure engineers building Terraform providers
- DevOps teams creating providers for internal APIs
- Open-source maintainers publishing new Terraform providers
- Platform teams exposing their APIs via Terraform
new-terraform-provider FAQ
The scaffold supports explicit configuration and environment variable fallback. Use the provider-configuration skill to add shared credentials files, profiles, platform identity, and configure-time validation.
After scaffolding, use the provider-resources skill to add your first resource or data source to the provider.
This skill is designed for new providers. If you're already in a provider workspace, it will confirm before creating a new one.
The skill uses the latest terraform-plugin-framework; check HashiCorp's documentation for minimum Go version requirements.
No, this skill only scaffolds the provider foundation. Use provider-resources skill to add actual resources and data sources.
Full instructions (SKILL.md)
Source of truth, from hashicorp/agent-skills.
name: new-terraform-provider description: >- Use this when scaffolding a new Terraform provider with the Plugin Framework: workspace layout, go module setup, provider server main.go, and a provider.go with schema and Configure. Also use when a user wants to start building a provider for a new API or asks how to begin a terraform-provider-* project. license: MPL-2.0 metadata: lifecycle-status: active copyright: Copyright IBM Corp. 2026 version: "0.0.1"
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.
- Write an
internal/provider/provider.gofile that follows the example. Rename thedemoprovider, theDEMO_*environment variables, and the authentication attributes to match the target API. - Remove TODO comments from
main.goandprovider.go. - Run
go mod tidy - Run
go build -o /dev/null - Run
go test ./...The scaffold resolves credentials as explicit config with environment variable fallback. To grow that into a full credential provider chain (shared credentials files, profiles, platform identity, configure-time validation), use theprovider-configurationskill (if available). To add the first resource or data source, use theprovider-resourcesskill (if available).
Related skills
More from hashicorp/agent-skills and the wider catalog.

provider-actions
Implement imperative Terraform Provider actions at lifecycle events using the Plugin Framework.

provider-docs
Create and validate Terraform provider documentation for Registry using HashiCorp patterns and tfplugindocs.

provider-resources
Implement Terraform Provider resources and data sources using the Plugin Framework with CRUD operations, schema design, and acceptance tests.

provider-test-patterns
Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework.

push-to-registry
Push Packer build metadata to HCP Packer registry for image lifecycle tracking and governance.

refactor-module
Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp best practices.