class RubyTerraform::Commands::StateList

Wraps the +terraform state list+ command which lists resources in the Terraform state.

This command lists resource instances in the Terraform state. The address option can be used to filter the instances by resource or module. If no pattern is given, all resource instances are listed.

The addresses must either be module addresses or absolute resource addresses, such as:

An {RubyTerraform::Errors::ExecutionError} will be raised if any of the resources or modules given as filter addresses do not exist in the state.

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

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

@example Basic Invocation

RubyTerraform::Commands::StateList.new.execute

Public Instance Methods

arguments(parameters) click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/state_list.rb, line 66
def arguments(parameters)
  [parameters[:address], parameters[:addresses]]
end
options() click to toggle source

@!visibility private

Calls superclass method RubyTerraform::Options::Global#options
# File lib/ruby_terraform/commands/state_list.rb, line 58
def options
  %w[
    -state
    -id
  ] + super
end
subcommands() click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/state_list.rb, line 53
def subcommands
  %w[state list]
end