class RubyTerraform::Commands::Graph

Wraps the +terraform graph+ command which outputs the visual execution graph of terraform resources according to either the current configuration or an execution plan.

The graph is outputted in DOT format. The typical program that can read this format is GraphViz, but many web services are also available to read this format.

The :type option can be used to control the type of graph shown. Terraform creates different graphs for different operations. See the options below for the list of types supported. The default type is +“plan”+ if a configuration is given, and +“apply”+ if a plan file is passed as an argument.

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

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

@example Basic Invocation

RubyTerraform::Commands::Graph.new.execute

Public Instance Methods

arguments(parameters) click to toggle source

@!visibility private

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

@!visibility private

Calls superclass method RubyTerraform::Options::Global#options
# File lib/ruby_terraform/commands/graph.rb, line 55
def options
  %w[
    -plan
    -draw-cycles
    -type
    -module-depth
  ] + super
end
subcommands() click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/graph.rb, line 50
def subcommands
  %w[graph]
end