pub struct DestroyCommand { /* private fields */ }Expand description
Command for destroying Terraform-managed infrastructure.
This is equivalent to terraform apply -destroy but provided as a
separate command for clarity and discoverability.
use terraform_wrapper::{Terraform, TerraformCommand};
use terraform_wrapper::commands::destroy::DestroyCommand;
let tf = Terraform::builder().working_dir("/tmp/infra").build()?;
DestroyCommand::new()
.auto_approve()
.execute(&tf)
.await?;Implementations§
Source§impl DestroyCommand
impl DestroyCommand
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 DestroyCommand
impl Clone for DestroyCommand
Source§fn clone(&self) -> DestroyCommand
fn clone(&self) -> DestroyCommand
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 DestroyCommand
impl Debug for DestroyCommand
Source§impl Default for DestroyCommand
impl Default for DestroyCommand
Source§fn default() -> DestroyCommand
fn default() -> DestroyCommand
Returns the “default value” for a type. Read more
Source§impl TerraformCommand for DestroyCommand
impl TerraformCommand for DestroyCommand
Source§type Output = CommandOutput
type Output = CommandOutput
The output type produced by this command.
Source§fn supports_input(&self) -> bool
fn supports_input(&self) -> bool
Whether this command supports the
-input=false flag. Read moreAuto Trait Implementations§
impl Freeze for DestroyCommand
impl RefUnwindSafe for DestroyCommand
impl Send for DestroyCommand
impl Sync for DestroyCommand
impl Unpin for DestroyCommand
impl UnsafeUnpin for DestroyCommand
impl UnwindSafe for DestroyCommand
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