generate

package
v0.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package generate has the logic to generate Graph from HCL or State

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromHCL

func FromHCL(fs afero.Fs, path string, opt Options) (*graph.Graph, error)

FromHCL generates a new graph from the HCL on the path, it can be a file or a Module/Dir

func FromState

func FromState(tfstate json.RawMessage, opt Options) (*graph.Graph, map[string]interface{}, error)

FromState generate a graph.Graph from the tfstate applying the opt

Types

type Options

type Options struct {
	// Raw means the RawProvider instead of the
	// specific one
	Raw bool

	// Clean means that the Nodes that do not have
	// any connection will be "removed"
	Clean bool

	// Connections toggles the Provider logic for
	// merging Edges between Nodes into one
	Connections bool

	// ExternalNodes will try to add extra
	// Nodes detected to make the graph better,
	// like the 'im_out'
	ExternalNodes bool
}

Options are the possible options that can be used to generate a Graph

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL