class RubyTerraform::Commands::StateReplaceProvider

Wraps the +terraform state replace-provider+ command which replaces provider for resources in the Terraform state.

For options accepted on construction, see {#initialize}.

When executing an instance of {StateReplaceProvider} via {#execute}, the following options are supported:

@example Basic Invocation

RubyTerraform::Commands::StateReplaceProvider.new.execute(
  from: 'hashicorp/aws',
  to: 'registry.acme.corp/acme/aws')

Public Instance Methods

arguments(parameters) click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/state_replace_provider.rb, line 63
def arguments(parameters)
  [parameters[:from], parameters[:to]]
end
options() click to toggle source

@!visibility private

Calls superclass method RubyTerraform::Options::Global#options
# File lib/ruby_terraform/commands/state_replace_provider.rb, line 51
def options
  %w[
    -auto-approve
    -backup
    -lock
    -lock-timeout
    -state
    -ignore-remote-version
  ] + super
end
subcommands() click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/state_replace_provider.rb, line 46
def subcommands
  %w[state replace-provider]
end