Terraform
Code Generation
Note
Code Generation is currently in tech preview.Code generation can reduce the amount of manual effort required by developers to maintain and build Terraform Providers. This section contains information about the interface, tooling, and libraries that are available to support code generation.
Design
Provider code generation is designed to be vendor/tool agnostic and to be extensible by the Terraform ecosystem. Read more about the overall design, challenges, and related terminology in the Design section.
Specification
The Provider code generation ecosystem relies on a common interface defined as an intermediate representation (IR) in JSON Schema. See the Specification section for more information.
OpenAPI Provider Spec Generator
A commonly used Interface Definition Language (IDL) for remote APIs is OpenAPI; which provides it's own schema and type definitions for how to interact with a given service.
Learn more about the OpenAPI Provider Spec Generator that transforms an OpenAPI specification into a provider code specification.
Framework Code Generator
Provider code specifications can be used to generate Terraform Plugin Framework Go code using the Framework Code Generator.
Workflow Example
Check out a demo that show some ideas on how to use the code generation tools in your development workflow in the Workflow Example section.