pub trait TerraformCommand: Send + Sync {
type Output: Send;
// Required methods
fn args(&self) -> Vec<String>;
fn execute(
&self,
tf: &Terraform,
) -> impl Future<Output = Result<Self::Output>> + Send;
// Provided methods
fn supports_input(&self) -> bool { ... }
fn prepare_args(&self, tf: &Terraform) -> Vec<String> { ... }
}Expand description
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn supports_input(&self) -> bool
fn supports_input(&self) -> bool
Whether this command supports the -input=false flag.
Defaults to false. Commands that accept -input (init, plan, apply,
destroy, import, refresh) should override this to return true.
Sourcefn prepare_args(&self, tf: &Terraform) -> Vec<String>
fn prepare_args(&self, tf: &Terraform) -> Vec<String>
Build the argument list with -input=false injected when appropriate.
Calls args and, if tf.no_input is set
and supports_input returns true,
inserts -input=false after the subcommand name.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl TerraformCommand for ApplyCommand
impl TerraformCommand for ApplyCommand
type Output = CommandOutput
Source§impl TerraformCommand for DestroyCommand
impl TerraformCommand for DestroyCommand
type Output = CommandOutput
Source§impl TerraformCommand for FmtCommand
impl TerraformCommand for FmtCommand
type Output = CommandOutput
Source§impl TerraformCommand for ForceUnlockCommand
impl TerraformCommand for ForceUnlockCommand
type Output = CommandOutput
Source§impl TerraformCommand for GetCommand
impl TerraformCommand for GetCommand
type Output = CommandOutput
Source§impl TerraformCommand for GraphCommand
impl TerraformCommand for GraphCommand
type Output = CommandOutput
Source§impl TerraformCommand for ImportCommand
impl TerraformCommand for ImportCommand
type Output = CommandOutput
Source§impl TerraformCommand for InitCommand
impl TerraformCommand for InitCommand
type Output = CommandOutput
Source§impl TerraformCommand for ModulesCommand
impl TerraformCommand for ModulesCommand
type Output = CommandOutput
Source§impl TerraformCommand for OutputCommand
impl TerraformCommand for OutputCommand
type Output = OutputResult
Source§impl TerraformCommand for PlanCommand
impl TerraformCommand for PlanCommand
type Output = CommandOutput
Source§impl TerraformCommand for ProvidersCommand
impl TerraformCommand for ProvidersCommand
type Output = CommandOutput
Source§impl TerraformCommand for RawCommand
impl TerraformCommand for RawCommand
type Output = CommandOutput
Source§impl TerraformCommand for RefreshCommand
impl TerraformCommand for RefreshCommand
type Output = CommandOutput
Source§impl TerraformCommand for ShowCommand
impl TerraformCommand for ShowCommand
type Output = ShowResult
Source§impl TerraformCommand for StateCommand
impl TerraformCommand for StateCommand
type Output = CommandOutput
Source§impl TerraformCommand for TestCommand
impl TerraformCommand for TestCommand
type Output = CommandOutput
Source§impl TerraformCommand for ValidateCommand
Available on crate feature json only.
impl TerraformCommand for ValidateCommand
Available on crate feature
json only.type Output = ValidationResult
Source§impl TerraformCommand for VersionCommand
Available on crate feature json only.
impl TerraformCommand for VersionCommand
Available on crate feature
json only.