Skip to main content

Module schema

Module schema 

Source
Expand description

Provider schema → cty implied type (terraform’s Block.ImpliedType). The bridge from GetProviderSchema to the magma-cty apply codec. Provider schema → cty implied type (terraform’s Block.ImpliedType).

A tfplugin6 resource Schema describes a resource as a Block of typed attributes + nested blocks. To marshal a resource’s attributes onto the wire as a DynamicValue, magma needs the resource’s implied cty type — the object type the Block describes. This module derives it, composing magma_cty::CtyType with the attributes’ go-cty JSON type encodings (which [CtyType::from_json] already parses).

This is the bridge between GetProviderSchema and the apply codec: schema → CtyType, then magma_cty encodes the rendered attributes against that type for ApplyResourceChange.

Enums§

SchemaError
Moved to magma-provider-api — see that crate’s header. Re-exported so magma_plugin::schema::SchemaError still resolves.

Functions§

block5_implied_type
Convert a tfplugin5 Block to the tfplugin6 shape, then derive the implied cty type via block_implied_type.
block_implied_type
The implied cty object type of a resource / provider / data-source Block — attributes plus nested blocks, in a single object type.