Documentation ¶
Index ¶
- func ConstructKRMExternalRefValFromTFRefVal(tfRefVal, valueTemplate string, tfToGVK map[string]schema.GroupVersionKind) (string, error)
- func ConstructKRMExternalReferenceObject(value string) map[string]interface{}
- func ConstructKRMNameReferenceObject(value string, tfToGVK map[string]schema.GroupVersionKind) (map[string]interface{}, error)
- func GetTFReferenceValue(value interface{}) (tfRefValue, valueTemplate string, containsTFReference bool, err error)
- type DependencyGraph
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructKRMExternalRefValFromTFRefVal ¶
func ConstructKRMExternalRefValFromTFRefVal(tfRefVal, valueTemplate string, tfToGVK map[string]schema.GroupVersionKind) (string, error)
ConstructKRMExternalRefValFromTFRefVal constructs the external referenced value of the reference field with "TF Reference Value" in the format of `[referenced_tf_type].[referenced_resource_name].[referenced_field_name]` and the "Value Template".
func GetTFReferenceValue ¶
func GetTFReferenceValue(value interface{}) (tfRefValue, valueTemplate string, containsTFReference bool, err error)
GetTFReferenceValue extracts "TF Reference Value" in the format of `[referenced_tf_type].[referenced_resource_name].[referenced_field_name]`, "Value Template" if the input contains more than the "TF Reference Value", and a bool result of whether the input contains a TF ReferenceValue.
Types ¶
type DependencyGraph ¶
type DependencyGraph struct {
// contains filtered or unexported fields
}
func NewDependencyGraph ¶
func NewDependencyGraph() *DependencyGraph
func (*DependencyGraph) AddDependencyWithTFRefVal ¶
func (d *DependencyGraph) AddDependencyWithTFRefVal(tfRefValOfReferencee, referencer string)
AddDependencyWithTFRefVal adds an edge in the dependency graph using the referencer's TF type, and the referencee's "TF Reference Value" in the format of `[referenced_tf_type].[referenced_resource_name].[referenced_field_name]`.
func (*DependencyGraph) TopologicalSort ¶
func (d *DependencyGraph) TopologicalSort() []string