Documentation
¶
Index ¶
- Constants
- func EnrichStateFile(nodeTable map[string]Node, planFile []byte, tfConfigUrl string, ...) (map[string]Node, error)
- func ParsePlanFile(planFile []byte, tfConfigUrl string, tfConfigMainPath string) (map[string]Node, error)
- func ParseStateFile(stateFile []byte) (map[string]Node, error)
- type Module
- func (nodeData Module) AddAttribute(key string, attribute interface{})
- func (nodeData Module) AddChild(address string)
- func (nodeData Module) GetAddress() string
- func (nodeData Module) GetNodeType() string
- func (module *Module) MarshalBinary() ([]byte, error)
- func (nodeData Module) SetLocation(location string)
- type Node
- type Provider
- func (nodeData Provider) AddAttribute(key string, attribute interface{})
- func (nodeData Provider) AddChild(address string)
- func (nodeData Provider) GetAddress() string
- func (nodeData Provider) GetNodeType() string
- func (provider *Provider) MarshalBinary() ([]byte, error)
- func (nodeData Provider) SetLocation(location string)
- type ReferenceResource
- func (nodeData ReferenceResource) AddAttribute(key string, attribute interface{})
- func (nodeData ReferenceResource) AddChild(address string)
- func (nodeData ReferenceResource) GetAddress() string
- func (nodeData ReferenceResource) GetNodeType() string
- func (nodeData ReferenceResource) MarshalBinary() ([]byte, error)
- func (nodeData ReferenceResource) SetLocation(location string)
- type Resource
- func (nodeData Resource) AddAttribute(key string, attribute interface{})
- func (nodeData Resource) AddChild(address string)
- func (nodeData Resource) GetAddress() string
- func (nodeData Resource) GetNodeType() string
- func (resource *Resource) MarshalBinary() ([]byte, error)
- func (nodeData Resource) SetLocation(location string)
Constants ¶
View Source
const ( Node_type_module = "Module" Node_type_resource = "Resource" Node_type_reference_resource = "ReferenceResource" Node_type_provider = "Provider" )
View Source
const ( Resource_action_no_op = "noop" Resource_action_created = "created" )
View Source
const ( State_current = "Current_State" State_planned = "Planned_State" )
View Source
const (
RootAddress = "_root"
)
Variables ¶
This section is empty.
Functions ¶
func EnrichStateFile ¶
func EnrichStateFile(nodeTable map[string]Node, planFile []byte, tfConfigUrl string, tfConfigMainPath string) (map[string]Node, error)
EnrichStateFile takes an existing node table and enriches the nodes with the information that the provided json formatted plan file contains. It is assumed that the provided node Table only contains the planned values from a tfjson state file.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents a terraform module
func (Module) AddAttribute ¶
func (nodeData Module) AddAttribute(key string, attribute interface{})
func (Module) GetAddress ¶
func (nodeData Module) GetAddress() string
func (Module) GetNodeType ¶
func (nodeData Module) GetNodeType() string
func (*Module) MarshalBinary ¶
func (Module) SetLocation ¶
func (nodeData Module) SetLocation(location string)
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider represents a terraform provider
func (Provider) AddAttribute ¶
func (nodeData Provider) AddAttribute(key string, attribute interface{})
func (Provider) GetAddress ¶
func (nodeData Provider) GetAddress() string
func (Provider) GetNodeType ¶
func (nodeData Provider) GetNodeType() string
func (*Provider) MarshalBinary ¶
func (Provider) SetLocation ¶
func (nodeData Provider) SetLocation(location string)
type ReferenceResource ¶
type ReferenceResource struct {
Dependencies []string `json:"dependencies,omitempty"`
// contains filtered or unexported fields
}
func NewReferenceResource ¶
func NewReferenceResource( address string, children []string, dependencies []string, ) (*ReferenceResource, error)
func (ReferenceResource) AddAttribute ¶
func (nodeData ReferenceResource) AddAttribute(key string, attribute interface{})
func (ReferenceResource) GetAddress ¶
func (nodeData ReferenceResource) GetAddress() string
func (ReferenceResource) GetNodeType ¶
func (nodeData ReferenceResource) GetNodeType() string
func (ReferenceResource) MarshalBinary ¶
func (ReferenceResource) SetLocation ¶
func (nodeData ReferenceResource) SetLocation(location string)
type Resource ¶
type Resource struct {
// Dependencies contain the addresses of the ressources on which this ressource depends
Dependencies []string `json:"dependencies,omitempty"`
// The actions which are performed on the ressource when the plan file is executed.
Actions []string `json:"actions,omitempty"`
// States contain the attributes of a resource that are associated with a specific state
States map[string]map[string]interface{} `json:"states,omitempty"`
// contains filtered or unexported fields
}
Resource represents a terraform resource.
func (Resource) AddAttribute ¶
func (nodeData Resource) AddAttribute(key string, attribute interface{})
func (Resource) GetAddress ¶
func (nodeData Resource) GetAddress() string
func (Resource) GetNodeType ¶
func (nodeData Resource) GetNodeType() string
func (*Resource) MarshalBinary ¶
func (Resource) SetLocation ¶
func (nodeData Resource) SetLocation(location string)
Click to show internal directories.
Click to hide internal directories.