sampleconversion

package
v1.116.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 ConstructKRMExternalReferenceObject

func ConstructKRMExternalReferenceObject(value string) map[string]interface{}

func ConstructKRMNameReferenceObject

func ConstructKRMNameReferenceObject(value string, tfToGVK map[string]schema.GroupVersionKind) (map[string]interface{}, error)

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

Jump to

Keyboard shortcuts

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