class RubyTerraform::Commands::Show
Wraps the +terraform show+ command which reads and outputs a Terraform state or plan file in a human-readable form. If no path is specified, the current state will be shown.
For options accepted on construction, see {#initialize}.
When executing an instance of {Show} via {#execute}, the following options are supported:
-
:path
: the path to a state file or plan to show. -
:chdir
: the path of a working directory to switch to before executing the given subcommand. -
:no_color
: whether or not the output from the command should be in color; defaults tofalse
. -
:json
: iftrue
, outputs the Terraform plan or state in a machine-readable form; defaults tofalse
.
@example Basic Invocation
RubyTerraform::Commands::Show.new.execute
Public Instance Methods
arguments(parameters)
click to toggle source
@!visibility private
# File lib/ruby_terraform/commands/show.rb, line 45 def arguments(parameters) [parameters[:path]] end
options()
click to toggle source
@!visibility private
Calls superclass method
RubyTerraform::Options::Global#options
# File lib/ruby_terraform/commands/show.rb, line 37 def options %w[ -json -no-color ] + super end
subcommands()
click to toggle source
@!visibility private
# File lib/ruby_terraform/commands/show.rb, line 32 def subcommands %w[show] end