pub struct ApplyCommand { /* private fields */ }Expand description
Command for applying Terraform changes.
When applying a saved plan file, options like -var, -var-file, and
-target are not valid (Terraform will reject them).
use terraform_wrapper::{Terraform, TerraformCommand};
use terraform_wrapper::commands::apply::ApplyCommand;
let tf = Terraform::builder().working_dir("/tmp/infra").build()?;
ApplyCommand::new()
.auto_approve()
.var("region", "us-west-2")
.execute(&tf)
.await?;Implementations§
Source§impl ApplyCommand
impl ApplyCommand
Sourcepub fn plan_file(self, path: &str) -> Self
pub fn plan_file(self, path: &str) -> Self
Apply a previously saved plan file (positional argument).
Sourcepub fn auto_approve(self) -> Self
pub fn auto_approve(self) -> Self
Skip interactive approval (-auto-approve).
Sourcepub fn lock_timeout(self, timeout: &str) -> Self
pub fn lock_timeout(self, timeout: &str) -> Self
Duration to wait for state lock (-lock-timeout).
Sourcepub fn parallelism(self, n: u32) -> Self
pub fn parallelism(self, n: u32) -> Self
Limit the number of concurrent operations (-parallelism).
Trait Implementations§
Source§impl Clone for ApplyCommand
impl Clone for ApplyCommand
Source§fn clone(&self) -> ApplyCommand
fn clone(&self) -> ApplyCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApplyCommand
impl Debug for ApplyCommand
Source§impl Default for ApplyCommand
impl Default for ApplyCommand
Source§fn default() -> ApplyCommand
fn default() -> ApplyCommand
Returns the “default value” for a type. Read more
Source§impl TerraformCommand for ApplyCommand
impl TerraformCommand for ApplyCommand
Auto Trait Implementations§
impl Freeze for ApplyCommand
impl RefUnwindSafe for ApplyCommand
impl Send for ApplyCommand
impl Sync for ApplyCommand
impl Unpin for ApplyCommand
impl UnsafeUnpin for ApplyCommand
impl UnwindSafe for ApplyCommand
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
Mutably borrows from an owned value. Read more