Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVariableNames ¶
func GetVariableNames(blocks []*hashicorpHCL.Block) []string
GetVariableNames takes a list of all blocks and returns the names with type == "variable" Example:
variable "say_hello" { type = "string" }
func Sort ¶
func Sort(blocks []*hashicorpHCL.Block) []*hashicorpHCL.Block
Sort takes an array of *hcl.Block and returns an array of the same blocks, topologically sorted by their dependency graph. This ensures all blocks are evaluated after the blocks they depend on.
func ValidateConfig ¶
ValidateConfig checks the given config for some common errors and exits with error messages and how to fix the issues.
Types ¶
type ResourceEdge ¶
type ResourceEdge struct {
// contains filtered or unexported fields
}
ResourceEdge implements graph.Edge and represents an edge between two resources in the dependency graph DAG
func (ResourceEdge) From ¶
func (E ResourceEdge) From() graph.Node
From returns the graph.Node (ResourceNode) that represents the "from" node in an edge of the dependency graph DAG
func (ResourceEdge) To ¶
func (E ResourceEdge) To() graph.Node
To returns the graph.Node (ResourceNode) that represents the "to" node in an edge of the dependency graph DAG
func (ResourceEdge) Weight ¶
func (E ResourceEdge) Weight() float64
Weight returns a hardcoded weight for an edge of the dependency graph DAG This isn't actually used for anything right now but needs to be implemented, so it returns 0.0 for every edge.
type ResourceNode ¶
type ResourceNode struct {
// contains filtered or unexported fields
}
ResourceNode implements graph.Node and represents a resource node in the dependency graph DAG
func (ResourceNode) Block ¶
func (N ResourceNode) Block() *hcl.Block
Block returns the hcl.Block of a ResourceNode
func (ResourceNode) ID ¶
func (N ResourceNode) ID() int64
ID returns the unique int64 id of a ResourceNode
func (ResourceNode) Name ¶
func (N ResourceNode) Name() string
Name returns the unique string name of a ResourceNode