state

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutputKeysValueAsString

func OutputKeysValueAsString(outputVals map[string]*states.OutputValue, key string) (string, error)

OutputKeysValueAsString returns the given OutputValue as a string in JSON format for the OutputValues map

func OutputKeysValueAsStringDefault

func OutputKeysValueAsStringDefault(outputVals map[string]*states.OutputValue, key, defaultVal string) string

OutputKeysValueAsStringDefault returns the given OutputValue as a string in JSON format for the OutputValues map, however an error will make it return the defaultVal A check to outputvalues being empty should be done outside this function if you are not expecting the defaultVal to be returned when empty

func ValueAsString

func ValueAsString(v *states.OutputValue) (s string, err error)

ValueAsString returns the given OutputValue as a string in JSON format. Examples: `15`, `Hello`, “, `true`, `["hello", true]`

Types

type Node

type Node struct {
	PublicIP   string `json:"public_ip" yaml:"public_ip" mapstructure:"public_ip"`
	PrivateIP  string `json:"private_ip" yaml:"private_ip" mapstructure:"private_ip"`
	PublicDNS  string `json:"public_dns" yaml:"public_dns" mapstructure:"public_dns"`
	PrivateDNS string `json:"private_dns" yaml:"private_dns" mapstructure:"private_dns"`
	RoleName   string `json:"role" yaml:"role" mapstructure:"role"`
	Pool       string `json:"pool" yaml:"pool" mapstructure:"pool"`
}

Node represent a node created by the provisioner and should be in the terraform output

func NewNodeFromAttr

func NewNodeFromAttr(attr map[string]string) *Node

NewNodeFromAttr creates a node from the sttributes found in the TF state file

Jump to

Keyboard shortcuts

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