Back to skills
SkillHub ClubShip Full StackFull Stack

new-terraform-provider

Use this when scaffolding a new Terraform provider.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
473
Hot score
99
Updated
March 20, 2026
Overall rating
C3.6
Composite score
3.6
Best-practice grade
B81.2

Install command

npx @skill-hub/cli install hashicorp-agent-skills-new-terraform-provider

Repository

hashicorp/agent-skills

Skill path: terraform/provider-development/skills/new-terraform-provider

Use this when scaffolding a new Terraform provider.

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack.

Target audience: everyone.

License: MPL-2.0.

Original source

Catalog source: SkillHub Club.

Repository owner: hashicorp.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install new-terraform-provider into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/hashicorp/agent-skills before adding new-terraform-provider to shared team environments
  • Use new-terraform-provider for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: new-terraform-provider
description: Use this when scaffolding a new Terraform provider.
license: MPL-2.0
metadata:
  copyright: Copyright IBM Corp. 2026
  version: "0.0.1"
---

To scaffold a new Terraform provider with Plugin Framework:

1. 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.
1. Create a new workspace root directory. The root directory name should be
   prefixed with "terraform-provider-". Perform all subsequent steps in this
   new workspace.
1. Initialize a new Go module..
1. Run `go get -u github.com/hashicorp/terraform-plugin-framework@latest`.
1. Write a main.go file that follows [the example](assets/main.go).
1. Remove TODO comments from `main.go`
1. Run `go mod tidy`
1. Run `go build -o /dev/null`
1. Run `go test ./...`



---

## Referenced Files

> The following files are referenced in this skill and included for context.

### assets/main.go

```
package main

import (
	"context"
	"flag"
	"log"

	"example.org/terraform-provider-demo/internal/provider"
	"github.com/hashicorp/terraform-plugin-framework/providerserver"
)

var (
	// these will be set by the goreleaser configuration
	// to appropriate values for the compiled binary.
	version string = "dev"

	// goreleaser can pass other information to the main package, such as the specific commit
	// https://goreleaser.com/cookbooks/using-main.version/
)

func main() {
	var debug bool

	flag.BoolVar(&debug, "debug", false, "set to true to run the provider with support for debuggers like delve")
	flag.Parse()

	opts := providerserver.ServeOpts{
		// TODO: Update this string with the published name of your provider.
		// Also update the tfplugindocs generate command to either remove the
		// -provider-name flag or set its value to the updated provider name.
		Address: "registry.terraform.io/example/demo",
		Debug:   debug,
	}

	err := providerserver.Serve(context.Background(), provider.New(version), opts)

	if err != nil {
		log.Fatal(err.Error())
	}
}

```

new-terraform-provider | SkillHub