#[non_exhaustive]pub struct ParserBuilder { /* private fields */ }Expand description
Builder for Parser. Every method consumes and returns self so
configuration reads top-to-bottom.
Implementations§
Source§impl ParserBuilder
impl ParserBuilder
Sourcepub fn workspace_root(self, root: impl AsRef<Path>) -> Self
pub fn workspace_root(self, root: impl AsRef<Path>) -> Self
Required. Workspace root (the directory that contains the Terraform / Terragrunt code).
Sourcepub fn environment(self, name: impl Into<Arc<str>>) -> Self
pub fn environment(self, name: impl Into<Arc<str>>) -> Self
Pin terraform.workspace / Terragrunt cascade choice. Optional;
when unset the resolver leaves var.environment unresolved.
Sourcepub fn env_var_mode(self, mode: EnvVarMode) -> Self
pub fn env_var_mode(self, mode: EnvVarMode) -> Self
How get_env(...) / Terragrunt funcs read the process env. Default:
strict with an empty allowlist (no env vars are visible to user code).
Sourcepub fn allow_env(self, name: impl Into<Arc<str>>) -> Self
pub fn allow_env(self, name: impl Into<Arc<str>>) -> Self
Allow a single env var name through get_env(...). Repeatable.
Sourcepub fn allow_env_many<I, S>(self, names: I) -> Self
pub fn allow_env_many<I, S>(self, names: I) -> Self
Allowlist multiple env var names in one call.
Sourcepub fn var(self, key: impl Into<Arc<str>>, value: impl Into<Arc<str>>) -> Self
pub fn var(self, key: impl Into<Arc<str>>, value: impl Into<Arc<str>>) -> Self
Repo-level var.<key> = value binding. Repeatable. Values are
stored as Value::Str; for richer types build the Map manually
via Self::repo_vars.
Sourcepub fn repo_vars(self, vars: Map) -> Self
pub fn repo_vars(self, vars: Map) -> Self
Replace the repo-level variable map. See also Self::var.
Sourcepub fn profile_map(self, map: Arc<ProfileMap>) -> Self
pub fn profile_map(self, map: Arc<ProfileMap>) -> Self
Pin an explicit ProfileMap for the provider resolver.
Sourcepub fn load_profile_map_yaml(self, path: impl AsRef<Path>) -> Result<Self>
pub fn load_profile_map_yaml(self, path: impl AsRef<Path>) -> Result<Self>
Load the profile map from a YAML file (spec 16 § 3.2).
§Errors
Returns Error::Provider when the file is missing, malformed, or
violates the validator rules (account-id pattern, region length,
etc.).
Sourcepub fn load_aws_config(self, path: impl AsRef<Path>) -> Result<Self>
pub fn load_aws_config(self, path: impl AsRef<Path>) -> Result<Self>
Load the profile map from an ~/.aws/config-shaped INI file
(spec 16 § 3.1).
§Errors
Returns Error::Provider when the file is missing or malformed.
Sourcepub fn default_region(self, region: impl AsRef<str>) -> Result<Self>
pub fn default_region(self, region: impl AsRef<str>) -> Result<Self>
Default AWS region applied when neither provider blocks nor the Terragrunt cascade supply one.
§Errors
Returns Error::Validation when region fails the
Region validator (charset / length).
Sourcepub const fn strict_providers(self, strict: bool) -> Self
pub const fn strict_providers(self, strict: bool) -> Self
If true, the provider resolver returns StrictUnresolved when a
referenced profile is missing from the profile map. Default: false.
Sourcepub const fn max_walk_depth(self, depth: u32) -> Self
pub const fn max_walk_depth(self, depth: u32) -> Self
Maximum walk depth (discovery). Default: 16.
Sourcepub const fn max_total_files(self, n: u64) -> Self
pub const fn max_total_files(self, n: u64) -> Self
Maximum total files in the workspace. Default: 200 000.
Sourcepub const fn max_file_bytes(self, n: u64) -> Self
pub const fn max_file_bytes(self, n: u64) -> Self
Maximum size per file. Default: 4 MiB.
Sourcepub const fn max_include_depth(self, n: u32) -> Self
pub const fn max_include_depth(self, n: u32) -> Self
Maximum Terragrunt include depth. Default: 32.
Sourcepub const fn follow_symlinks(self, follow: bool) -> Self
pub const fn follow_symlinks(self, follow: bool) -> Self
Whether the discoverer follows symlinks. Default: false.
Trait Implementations§
Source§impl Clone for ParserBuilder
impl Clone for ParserBuilder
Source§fn clone(&self) -> ParserBuilder
fn clone(&self) -> ParserBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more