#[non_exhaustive]pub struct ProviderBlock {
pub local_name: Arc<str>,
pub alias: Option<Arc<str>>,
pub source_addr: Option<Arc<str>>,
pub region_expr: Option<Expression>,
pub profile_expr: Option<Expression>,
pub assume_role: Option<AssumeRole>,
pub raw: AttributeMap,
pub span: Span,
}Expand description
A provider "aws" {} declaration.
Field order matches [10-data-model.md § 2.2]. Construct via the generated
[ProviderBlockBuilder].
Debug redacts raw past the first few keys to avoid logging
potentially-sensitive provider configuration at INFO level. See
70-security.md § 5.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.local_name: Arc<str>Local name of the provider (e.g. "aws").
alias: Option<Arc<str>>Alias, if the block had alias = "...".
source_addr: Option<Arc<str>>Provider source address from required_providers (e.g.
"hashicorp/aws"), if known.
region_expr: Option<Expression>region = ... expression.
profile_expr: Option<Expression>profile = ... expression.
assume_role: Option<AssumeRole>Optional assume_role { ... } sub-block.
raw: AttributeMapVerbatim top-level attributes of the provider body.
span: SpanSpan of the opening provider keyword.
Implementations§
Source§impl ProviderBlock
impl ProviderBlock
Sourcepub fn builder() -> ProviderBlockBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> ProviderBlockBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building ProviderBlock.
On the builder, call .local_name(...), .alias(...)(optional), .source_addr(...)(optional), .region_expr(...)(optional), .profile_expr(...)(optional), .assume_role(...)(optional), .raw(...)(optional), .span(...) to set the values of the fields.
Finally, call .build() to create the instance of ProviderBlock.
Trait Implementations§
Source§impl Clone for ProviderBlock
impl Clone for ProviderBlock
Source§fn clone(&self) -> ProviderBlock
fn clone(&self) -> ProviderBlock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderBlock
impl Debug for ProviderBlock
Source§impl<'de> Deserialize<'de> for ProviderBlock
impl<'de> Deserialize<'de> for ProviderBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ProviderBlock
impl PartialEq for ProviderBlock
Source§fn eq(&self, other: &ProviderBlock) -> bool
fn eq(&self, other: &ProviderBlock) -> bool
self and other values to be equal, and is used by ==.