pub trait DynamicProvider:
Send
+ Sync
+ 'static {
// Required method
fn schema(&self, diags: &mut Diagnostics) -> Option<Schema>;
// Provided methods
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
terraform_version: String,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn meta_schema(&self, diags: &mut Diagnostics) -> Option<Schema> { ... }
fn get_resources(
&self,
diags: &mut Diagnostics,
) -> Option<HashMap<String, Box<dyn DynamicResource>>> { ... }
fn get_data_sources(
&self,
diags: &mut Diagnostics,
) -> Option<HashMap<String, Box<dyn DynamicDataSource>>> { ... }
fn get_functions(
&self,
diags: &mut Diagnostics,
) -> Option<HashMap<String, Box<dyn DynamicFunction>>> { ... }
}Expand description
Trait for implementing a provider without automatic serialization/deserialization
See also: Provider
Required Methods§
Sourcefn schema(&self, diags: &mut Diagnostics) -> Option<Schema>
fn schema(&self, diags: &mut Diagnostics) -> Option<Schema>
Provided Methods§
Sourcefn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate the configuration of the provider
§Arguments
diags- Diagnostics to record warnings and errors that occured during validationconfig- State as declared in the Terraform file
§Remarks
The return is ignored if there is an error in diagnostics.
If the return is None, an ad-hoc error is added to diagnostics.
Sourcefn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
terraform_version: String,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
terraform_version: String,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Configure the provider
§Arguments
diags- Diagnostics to record warnings and errors that occured during validationterraform_version- Version of the Terraform binary that calls the providerconfig- State as declared in the Terraform file
§Remarks
The return is ignored if there is an error in diagnostics.
If the return is None, an ad-hoc error is added to diagnostics.