pub enum ProviderError {
Transport(String),
Diagnostics(Vec<Diag>),
NoNewState,
PartiallyApplied {
diags: Vec<Diag>,
state: Box<DynamicValue>,
},
Schema(SchemaError),
}Variants§
Transport(String)
Diagnostics(Vec<Diag>)
NoNewState
PartiallyApplied
The provider returned an error diagnostic AND a new_state — the
resource IS (at least partially) committed provider-side.
This is not a rare edge: it is how the tfplugin contract expresses a
partial apply, and how Terraform core knows to persist a
half-created resource. AWS EIP is the canonical shape —
AllocateAddress commits, a follow-up call (tagging, association, the
post-create read) fails, and the provider returns the allocation id
together with an error.
Before this variant existed, check_diags(...)? ran BEFORE
new_state was read, so that state was thrown away and the caller
recorded nothing. The next reconcile re-planned a CREATE and allocated
a SECOND resource. Measured 2026-08-01: two orphaned EIPs
(3.151.179.36, 18.227.192.150), each billable, neither in state, while
the run reported created: 0.
Carrying the state in the ERROR — rather than returning Ok — keeps
the apply correctly failed while making the committed resource
impossible to drop on the floor: a caller must destructure this
variant to handle the error at all.
Schema(SchemaError)
Trait Implementations§
Source§impl Debug for ProviderError
impl Debug for ProviderError
Source§impl Display for ProviderError
impl Display for ProviderError
Source§impl Error for ProviderError
impl Error for ProviderError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<SchemaError> for ProviderError
impl From<SchemaError> for ProviderError
Source§fn from(source: SchemaError) -> Self
fn from(source: SchemaError) -> Self
Auto Trait Implementations§
impl Freeze for ProviderError
impl RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin for ProviderError
impl UnsafeUnpin for ProviderError
impl UnwindSafe for ProviderError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request