No description
Find a file
Service Account - Terraform Provider DevEx cbeb4a1e0d [CI] Update lock workflow file
2025-12-15 21:54:32 +01:00
.changes Update changelog 2024-09-24 20:22:23 +00:00
.github [CI] Update lock workflow file 2025-12-15 21:54:32 +01:00
cmd/tfplugingen-framework Switch dependency mitchellh/cli to hashicorp/cli (#106) 2023-12-21 09:53:41 -05:00
internal Replace tenv and exportloopref linters with usetesting and copyloopvar (#188) 2025-02-26 18:05:05 -05:00
META.d Add catalog metadata (META.d) (#198) 2025-05-13 08:19:38 -04:00
tools Bump github.com/hashicorp/copywrite from 0.21.0 to 0.22.0 in /tools (#191) 2025-03-24 11:53:32 -04:00
.changie.yaml [CI] terraform-devex-repos automation 2024-06-07 16:22:51 -04:00
.copywrite.hcl Add catalog metadata (META.d) (#198) 2025-05-13 08:19:38 -04:00
.gitignore Update binary name to tfplugingen-framework (#47) 2023-09-19 08:25:21 -04:00
.golangci.yml SEC-090: Automated trusted workflow pinning (2025-04-07) (#195) 2025-04-09 10:47:08 -05:00
.goreleaser.yml SEC-090: Automated trusted workflow pinning (2025-02-03) (#182) 2025-02-03 12:51:28 -05:00
CHANGELOG.md Update changelog 2024-09-24 20:22:23 +00:00
go.mod Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 (#187) 2025-03-07 16:24:18 -05:00
go.sum Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 (#187) 2025-03-07 16:24:18 -05:00
LICENSE [COMPLIANCE] Add copyright and license headers (#4) 2023-06-05 08:30:32 -04:00
Makefile Update binary name to tfplugingen-framework (#47) 2023-09-19 08:25:21 -04:00
questions.md Intermediate Representation to Provider Code Generator - Models & Associated External Types (#150) 2023-05-24 15:42:14 +01:00
README.md Add issue forms and external links for feedback (#94) 2023-11-27 08:12:19 -05:00

Terraform Plugin Framework Code Generator

Terraform Provider Code Generation is currently in tech preview. If you have general questions or feedback about provider code generation, please create a new topic in the Plugin Development Community Forum.

Overview

Terraform Plugin Framework Code Generator is a CLI tool which converts a Provider Code Specification into Go code for use in a Terraform Plugin Framework Provider. Additionally, scaffolding commands with customizable templates are available which generate boilerplate provider code for new data sources and resources to reduce development time.

The generator currently supports outputting:

  • Schema: With all framework functionality, such as validators and plan modifiers, and no limits on nesting.
  • Data Model Types: With conversion to external Go types, if provided in the specification, such as API SDK types.

Over time, it is anticipated that the Provider Code Specification and this generator will be further enhanced to support CRUD logic.

Documentation

Full usage info and examples live on the HashiCorp developer site: https://developer.hashicorp.com/terraform/plugin/code-generation/framework-generator

Usage

Installation

You install a copy of the binary manually from the releases tab, or install via the Go toolchain:

go install github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework@latest

Generate Command

The generate command uses a specification](https://github.com/hashicorp/terraform-plugin-codegen-spec) as input and generates Terraform Provider code as output.

For example:

tfplugingen-framework generate all \
    --input specification.json \
    --output internal/provider

Refer to the documentation for further details.

Scaffold Command

The scaffold command generates starter code for a data source, provider, or resource to reduce initial development effort. The templates can be customized to match provider code conventions and automatically include API client configuration.

For example:

tfplugingen-framework scaffold data-source \
    --name example \
    --force \
    --output-dir internal/provider

Refer to the documentation for further details.

License

Refer to Mozilla Public License v2.0.

Experimental Status

By using the software in this repository (the "Software"), you acknowledge that: (1) the Software is still in development, may change, and has not been released as a commercial product by HashiCorp and is not currently supported in any way by HashiCorp; (2) the Software is provided on an "as-is" basis, and may include bugs, errors, or other issues; (3) the Software is NOT INTENDED FOR PRODUCTION USE, use of the Software may result in unexpected results, loss of data, or other unexpected results, and HashiCorp disclaims any and all liability resulting from use of the Software; and (4) HashiCorp reserves all rights to make all decisions about the features, functionality and commercial release (or non-release) of the Software, at any time and without any obligation or liability whatsoever.