pub struct FmtCommand { /* private fields */ }Expand description
Command for formatting Terraform configuration files.
By default, rewrites files in-place. Use .check() to only verify
formatting without modifying files, or .diff() to display differences.
use terraform_wrapper::{Terraform, TerraformCommand};
use terraform_wrapper::commands::fmt::FmtCommand;
let tf = Terraform::builder().working_dir("/tmp/infra").build()?;
// Check formatting without modifying files
let output = FmtCommand::new().check().execute(&tf).await?;Implementations§
Source§impl FmtCommand
impl FmtCommand
Trait Implementations§
Source§impl Clone for FmtCommand
impl Clone for FmtCommand
Source§fn clone(&self) -> FmtCommand
fn clone(&self) -> FmtCommand
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 FmtCommand
impl Debug for FmtCommand
Source§impl Default for FmtCommand
impl Default for FmtCommand
Source§fn default() -> FmtCommand
fn default() -> FmtCommand
Returns the “default value” for a type. Read more
Source§impl TerraformCommand for FmtCommand
impl TerraformCommand for FmtCommand
Source§type Output = CommandOutput
type Output = CommandOutput
The output type produced by this command.
Source§async fn execute(&self, tf: &Terraform) -> Result<CommandOutput>
async fn execute(&self, tf: &Terraform) -> Result<CommandOutput>
Execute this command against the given Terraform client.
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 FmtCommand
impl RefUnwindSafe for FmtCommand
impl Send for FmtCommand
impl Sync for FmtCommand
impl Unpin for FmtCommand
impl UnsafeUnpin for FmtCommand
impl UnwindSafe for FmtCommand
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