Skip to main content

Crate terraform_forge

Crate terraform_forge 

Source
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§

tf_backend

Structs§

AuthConfig
Provider authentication configuration (token field, environment variables).
CrudMapping
Maps CRUD operations to API endpoints and schemas.
DataSourceMeta
Data source metadata.
DataSourceSpec
Top-level data source specification loaded from TOML.
FieldOverride
Per-field overrides in the resource spec.
GeneratedDataSource
Generated Go source for a complete TF data source.
GeneratedResource
Generated Go source for a complete TF resource.
GeneratedTest
Generated acceptance test file for a resource.
IdentityConfig
Identity and import configuration.
ProviderDefaults
Provider-level default settings (fields to skip globally).
ProviderMeta
Provider metadata (name, description, version, SDK import).
ProviderSpec
Provider-level configuration.
ReadMapping
Maps a read operation to an API endpoint and schema.
ResourceMeta
Resource metadata.
ResourceSpec
Top-level resource specification loaded from TOML.
TfAttribute
A resolved TF schema attribute ready for code generation.

Enums§

ForgeError
GoType
Go type representation for code generation.
TfAttrType
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 + OpenAPI spec.
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 IacAttribute to a resolved TfAttribute.
openapi_to_go
Map an OpenAPI type 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_case field 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 to PascalCase. Used for Go type names like StaticSecret from akeyless_static_secret.