tfhelper

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 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

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

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