pub struct ProvidersCommand { /* private fields */ }Expand description
Command for listing and managing Terraform providers.
Supports several subcommands for inspecting and managing provider dependencies:
use terraform_wrapper::{Terraform, TerraformCommand};
use terraform_wrapper::commands::providers::ProvidersCommand;
let tf = Terraform::builder().working_dir("/tmp/infra").build()?;
// List required providers
let output = ProvidersCommand::new().execute(&tf).await?;
// Output provider schemas as JSON (useful for tooling)
let output = ProvidersCommand::schema().execute(&tf).await?;
// Mirror providers to a local directory
let output = ProvidersCommand::mirror("/tmp/providers")
.platform("linux_amd64")
.execute(&tf)
.await?;Implementations§
Source§impl ProvidersCommand
impl ProvidersCommand
Trait Implementations§
Source§impl Clone for ProvidersCommand
impl Clone for ProvidersCommand
Source§fn clone(&self) -> ProvidersCommand
fn clone(&self) -> ProvidersCommand
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 ProvidersCommand
impl Debug for ProvidersCommand
Source§impl Default for ProvidersCommand
impl Default for ProvidersCommand
Source§impl TerraformCommand for ProvidersCommand
impl TerraformCommand for ProvidersCommand
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 ProvidersCommand
impl RefUnwindSafe for ProvidersCommand
impl Send for ProvidersCommand
impl Sync for ProvidersCommand
impl Unpin for ProvidersCommand
impl UnsafeUnpin for ProvidersCommand
impl UnwindSafe for ProvidersCommand
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