Expand description
Typed provider-RPC wrappers (configure / plan / apply) over a dialed
channel, speaking magma-cty values. The layer that makes apply real.
Typed provider-RPC wrappers — the tfplugin5/6 Provider service over
a dialed [Channel], speaking magma_cty values.
This is the layer that lets magma-apply stop being a structural
no-op and actually create resources (magma#2). Plugin::dial hands
back a gRPC Channel + the negotiated protocol; [ProviderConn]
wraps the matching generated client and exposes the four RPCs the
apply engine needs:
- [
ProviderConn::get_schema] — resource type → implied [CtyType]. - [
ProviderConn::configure] — provider credentials / settings. - [
ProviderConn::plan_resource_change] — provider-proposed new state. - [
ProviderConn::apply_resource_change] — create/update/delete; the returnedDynamicValueis the resource’s new state.
Both protocols are dispatched. SDKv2 providers (github — galho’s
target — aws, …) speak tfplugin5; framework providers speak tfplugin6.
ProviderConn::new selects the client from the handshake’s negotiated
PluginProtocol. The schema parser is shared (v5 schemas convert to
v6 via crate::schema::block5_implied_type); error-severity
diagnostics (severity 1 in both protocols) become a typed
[ProviderError].
Structs§
- Diag
- ── THE PROTOCOL DATA MODEL MOVED TO
magma-provider-api────────────ProviderSchema,PlannedChange,Diag,Severity,ProviderErrorandis_retryablewere defined here. They describe what a provider SAYS, not how it is reached, so they now live in the contract crate — which depends onmagma-ctyalone, so a native provider can implement the contract without dragging in tonic. - Planned
Change - ── THE PROTOCOL DATA MODEL MOVED TO
magma-provider-api────────────ProviderSchema,PlannedChange,Diag,Severity,ProviderErrorandis_retryablewere defined here. They describe what a provider SAYS, not how it is reached, so they now live in the contract crate — which depends onmagma-ctyalone, so a native provider can implement the contract without dragging in tonic. - Provider
Conn - A connected provider — the protocol-matched client over a dialed channel.
- Provider
Schema - ── THE PROTOCOL DATA MODEL MOVED TO
magma-provider-api────────────ProviderSchema,PlannedChange,Diag,Severity,ProviderErrorandis_retryablewere defined here. They describe what a provider SAYS, not how it is reached, so they now live in the contract crate — which depends onmagma-ctyalone, so a native provider can implement the contract without dragging in tonic.
Enums§
- Provider
Error - ── THE PROTOCOL DATA MODEL MOVED TO
magma-provider-api────────────ProviderSchema,PlannedChange,Diag,Severity,ProviderErrorandis_retryablewere defined here. They describe what a provider SAYS, not how it is reached, so they now live in the contract crate — which depends onmagma-ctyalone, so a native provider can implement the contract without dragging in tonic. - Severity
- ── THE PROTOCOL DATA MODEL MOVED TO
magma-provider-api────────────ProviderSchema,PlannedChange,Diag,Severity,ProviderErrorandis_retryablewere defined here. They describe what a provider SAYS, not how it is reached, so they now live in the contract crate — which depends onmagma-ctyalone, so a native provider can implement the contract without dragging in tonic.
Traits§
- Provider
- ── THE PROTOCOL DATA MODEL MOVED TO
magma-provider-api────────────ProviderSchema,PlannedChange,Diag,Severity,ProviderErrorandis_retryablewere defined here. They describe what a provider SAYS, not how it is reached, so they now live in the contract crate — which depends onmagma-ctyalone, so a native provider can implement the contract without dragging in tonic.
Functions§
- is_
retryable - ── THE PROTOCOL DATA MODEL MOVED TO
magma-provider-api────────────ProviderSchema,PlannedChange,Diag,Severity,ProviderErrorandis_retryablewere defined here. They describe what a provider SAYS, not how it is reached, so they now live in the contract crate — which depends onmagma-ctyalone, so a native provider can implement the contract without dragging in tonic.