tfhelper

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandStringList

func ExpandStringList(d []interface{}) []string

ExpandStringList expand an array of interface into array of string

func ExpandStringSet

func ExpandStringSet(d *schema.Set) []string

ExpandStringSet expand a set into array of string

func FindMapInSetWithGivenKeyValue

func FindMapInSetWithGivenKeyValue(d *schema.ResourceData, setName string, keyName string, keyValue interface{}) map[string]interface{}

FindMapInSetWithGivenKeyValue Pulls an element of `TypeSet` from the state. The values of this set are assumed to be `TypeMap`. The maps in the set are searched until a map is found with a value for `keyName` equal to `keyValue`.

If no such map is found, `nil` is returned

func GetRealProjectId

func GetRealProjectId(projectNameOrID string, meta interface{}) (string, error)

Get real project ID

func HashString added in v0.2.0

func HashString(s string) int

func ImportProjectQualifiedResource

func ImportProjectQualifiedResource() *schema.ResourceImporter

ImportProjectQualifiedResource Import a resource by an ID that looks like one of the following:

<project ID>/<resource ID>
<project name>/<resource ID>

func ImportProjectQualifiedResourceInteger

func ImportProjectQualifiedResourceInteger() *schema.ResourceImporter

ImportProjectQualifiedResourceInteger Import a resource by an ID that looks like one of the following:

<project ID>/<resource ID as integer>
<project name>/<resource ID as integer>

func ImportProjectQualifiedResourceUUID

func ImportProjectQualifiedResourceUUID() *schema.ResourceImporter

ImportProjectQualifiedResourceUUID Import a resource by an ID that looks like one of the following:

<project ID>/<resource ID as uuid>
<project name>/<resource ID as uuid>

func ParseGitRepoBranchID added in v0.4.0

func ParseGitRepoBranchID(id string) (string, string, error)

func ParseImportedID

func ParseImportedID(id string) (string, int, error)

ParseImportedID parse the imported int Id from the terraform import

func ParseImportedName

func ParseImportedName(id string) (string, string, error)

ParseImportedName parse the imported Id (Name) from the terraform import

func ParseImportedUUID

func ParseImportedUUID(id string) (string, string, error)

ParseImportedUUID parse the imported uuid from the terraform import

func ParseProjectIDAndResourceID

func ParseProjectIDAndResourceID(d *schema.ResourceData) (string, int, error)

ParseProjectIDAndResourceID parses from the schema's resource data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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