Generated banner for New Terraform Provider
Generated logo for New Terraform Provider

New Terraform Provider

HashiCorpOfficialPublished by HashiCorp

  • Skill
  • Workflow
  • Cloud and DevOps
  • MPL-2.0
  • Low risk
  • Has scripts

From the author

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.
— the description by HashiCorp

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a standardized workflow for initializing a new Terraform provider project. It handles the creation of the workspace directory, Go module initialization, and the generation of essential boilerplate files including main.go and the provider configuration. It is designed to help developers quickly set up the foundation for building custom providers for new APIs using the modern Plugin Framework.

What it does

  • Creates a new workspace directory with the required naming convention.
  • Initializes a Go module for the provider project.
  • Downloads the necessary Terraform Plugin Framework dependencies.
  • Generates a main.go file for the provider server.
  • Creates a provider.go file with initial schema and configuration logic.
  • Performs initial validation by running build and test commands.

When to use it

  • When starting a new Terraform provider project from scratch.
  • When you need to integrate a new API into the Terraform ecosystem.
  • When you want to ensure your provider follows standard Plugin Framework project structure.

Advantages

  • Ensures consistent project structure across different provider developments.
  • Automates the repetitive setup tasks for Go modules and file scaffolding.
  • Provides a clean starting point that is ready for immediate development and testing.

Usage examples

“I need to start building a new Terraform provider for the Acme API. How do I begin?”
The agent will create a new directory named terraform-provider-acme, initialize the Go module, and generate the necessary boilerplate files to start development.
“Scaffold a new Terraform provider project for my internal service.”
The agent will set up the workspace, configure the main.go and provider.go files, and run the initial build and test commands to verify the setup.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/hashicorp/new-terraform-provider/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip new-terraform-provider.zip -d .agents/skills

Documentation by HashiCorp

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).

Files

ATTRIBUTION.md

Attribution

This folder is an unmodified copy of the Agent Skill "new-terraform-provider", distributed by AutoGineer (https://autogineer.com/agent-skills).

The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.

Files added by AutoGineer

  • ATTRIBUTION.md: this file, written by AutoGineer

  • LICENSE: copied from LICENSE

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
HashiCorp
Publisher
HashiCorp (Official)
Source
hashicorp/agent-skills · plugins/terraform/skills/new-terraform-provider · commit 5e30fa5
Licence
Mozilla Public License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by HashiCorp or HashiCorp.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download new-terraform-provider.zip