All skills
hashicorp avatar

/new-terraform-provider

@4451cec official
by hashicorphashicorp/agent-skills880 stars
130

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.

Use this Skill: https://skilld.dev/gh/hashicorp/agent-skills/new-terraform-provider

This session only. Nothing lands on disk.

SKILL.md

≈82 tokens always: the name and description. ≈332 when used: this file.

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.
  2. Create a new workspace root directory. The root directory name should be prefixed with "terraform-provider-". Perform all subsequent steps in this new workspace.
  3. Initialize a new Go module.
  4. Run go get -u github.com/hashicorp/terraform-plugin-framework@latest.
  5. Write a main.go file that follows the example.
  6. Write an internal/provider/provider.go file that follows the example. Rename the demo provider, the DEMO_* environment variables, and the authentication attributes to match the target API.
  7. Remove TODO comments from main.go and provider.go.
  8. Run go mod tidy
  9. Run go build -o /dev/null
  10. 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 the provider-configuration skill (if available). To add the first resource or data source, use the provider-resources skill (if available).

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a workflow for scaffolding new Terraform providers using the official Plugin Framework. It utilizes standard Go development tools and dependencies. No security concerns were identified.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    2/2 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4451cec. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 2 months ago
Other metadata
metadata
{
  "lifecycle-status": "active",
  "copyright": "Copyright IBM Corp. 2026",
  "version": "0.0.1"
}
  • Go
  • terraform
  • provider
  • plugin-framework
  • scaffolding
  • hashicorp

README badge

README badge for hashicorp/agent-skills/new-terraform-provider

Scaffolds a new Terraform provider using the Plugin Framework, handling Go module initialization, dependencies, and a starter main.go file. Targets providers built with the official HashiCorp framework and assumes a Go development environment.

Generated from the current SKILL.md.

Does this skill work with Terraform Plugin SDKv2 or only Plugin Framework?
This skill scaffolds providers using Plugin Framework. It does not support the older SDKv2.
What happens if I'm already in a Terraform provider workspace?
The skill prompts you to confirm whether you want to create a new workspace. If you decline, it skips the scaffolding steps.
Do I need to have Go installed?
Yes. The skill initializes a Go module and runs Go commands like go get, go mod tidy, go build, and go test.
What does the main.go template include?
The skill provides a main.go example that removes TODO comments and is ready for basic compilation and testing after cleanup.

Generated from the current SKILL.md. These answers refresh after source changes.