pub struct StateCommand { /* private fields */ }Expand description
Command for managing Terraform state.
use terraform_wrapper::{Terraform, TerraformCommand};
use terraform_wrapper::commands::state::StateCommand;
let tf = Terraform::builder().working_dir("/tmp/infra").build()?;
// List resources in state
let output = StateCommand::list().execute(&tf).await?;
// Show a specific resource
let output = StateCommand::show("null_resource.example")
.execute(&tf)
.await?;Implementations§
Trait Implementations§
Source§impl Clone for StateCommand
impl Clone for StateCommand
Source§fn clone(&self) -> StateCommand
fn clone(&self) -> StateCommand
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 StateCommand
impl Debug for StateCommand
Source§impl TerraformCommand for StateCommand
impl TerraformCommand for StateCommand
Auto Trait Implementations§
impl Freeze for StateCommand
impl RefUnwindSafe for StateCommand
impl Send for StateCommand
impl Sync for StateCommand
impl Unpin for StateCommand
impl UnsafeUnpin for StateCommand
impl UnwindSafe for StateCommand
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