Expand description
Terraform provider code generator from OpenAPI specs.
Implements iac_forge::Backend for the terraform-plugin-framework Go SDK,
generating complete Go source files for resources, data sources, providers,
and acceptance test scaffolds.
Re-exports§
pub use tf_backend::TerraformBackend;
Modules§
Structs§
- Auth
Config - Provider authentication configuration (token field, environment variables).
- Crud
Mapping - Maps CRUD operations to API endpoints and schemas.
- Data
Source Meta - Data source metadata.
- Data
Source Spec - Top-level data source specification loaded from TOML.
- Field
Override - Per-field overrides in the resource spec.
- Generated
Data Source - Generated Go source for a complete TF data source.
- Generated
Resource - Generated Go source for a complete TF resource.
- Generated
Test - Generated acceptance test file for a resource.
- Identity
Config - Identity and import configuration.
- Provider
Defaults - Provider-level default settings (fields to skip globally).
- Provider
Meta - Provider metadata (name, description, version, SDK import).
- Provider
Spec - Provider-level configuration.
- Read
Mapping - Maps a read operation to an API endpoint and schema.
- Resource
Meta - Resource metadata.
- Resource
Spec - Top-level resource specification loaded from TOML.
- TfAttribute
- A resolved TF schema attribute ready for code generation.
Enums§
- Forge
Error - GoType
- Go type representation for code generation.
- TfAttr
Type - Terraform framework attribute type.
Functions§
- generate_
datasource - Generate a complete terraform-plugin-framework data source Go file.
- generate_
datasource_ attributes - Generate TF schema attributes for a data source.
- generate_
provider - Generate the provider.go file that registers all resources and data sources.
- generate_
resource - Generate a complete terraform-plugin-framework resource Go file.
- generate_
schema_ attributes - Generate TF schema attributes from a resource spec +
OpenAPIspec. - generate_
test - Generate acceptance test scaffolding for a resource.
- go_
to_ tf_ attr - Map a Go type to a TF framework attribute type.
- iac_
attr_ to_ tf - Convert an
IacAttributeto a resolvedTfAttribute. - openapi_
to_ go - Map an
OpenAPItype to a Go type. - render_
model_ struct - Generate the Go model struct for the resource.
- render_
read_ mapping_ code - Generate Go code that maps JSON response fields to TF state using
GetNestedString,GetNestedStringSlice, etc. - render_
schema_ attributes - Generate the Go source for TF framework schema attributes.
- sdk_
setter - Get the Go SDK body setter expression for a field.
- tf_
value_ type - Get the TF framework value type string for model struct fields.
- to_
go_ public_ name - Convert a hyphenated /
snake_casefield name to Go public name. - to_
tf_ name - Convert a name to TF
snake_case(hyphens become underscores). - to_
type_ name - Strip the
akeyless_prefix (or any<provider>_prefix) and convert toPascalCase. Used for Go type names likeStaticSecretfromakeyless_static_secret.