Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractProjectID() reference.ExtractValueFn
- func ExtractResourceID() reference.ExtractValueFn
- func GetField(from map[string]interface{}, path string) (string, error)
- func GetNameFromFullyQualifiedID(tfstate map[string]interface{}) (string, error)
- func SelfLinkExtractor() reference.ExtractValueFn
Constants ¶
View Source
const ( // KeyProject is the key for project in Terraform Provider Configuration KeyProject = "project" // SelfPackagePath is the golang path for this package. SelfPackagePath = "github.com/upbound/provider-gcp/config/common" // ExtractResourceIDFuncPath holds the GCP resource ID extractor func name ExtractResourceIDFuncPath = "github.com/upbound/provider-gcp/config/common.ExtractResourceID()" ExtractProjectIDFuncPath = "github.com/upbound/provider-gcp/config/common.ExtractProjectID()" )
Variables ¶
View Source
var ( // PathSelfLinkExtractor is the golang path to SelfLinkExtractor function // in this package. PathSelfLinkExtractor = SelfPackagePath + ".SelfLinkExtractor()" )
Functions ¶
func ExtractProjectID ¶ added in v0.33.0
func ExtractProjectID() reference.ExtractValueFn
func ExtractResourceID ¶
func ExtractResourceID() reference.ExtractValueFn
ExtractResourceID extracts the value of `spec.atProvider.id` from a Terraformed resource. If mr is not a Terraformed resource, returns an empty string.
func GetField ¶
GetField returns the value of field as a string in a map[string]interface{},
fails properly otherwise.
func GetNameFromFullyQualifiedID ¶
GetNameFromFullyQualifiedID extracts external-name from GCP ID Example: projects/{{project}}/zones/{{zone}}/instances/{{name}}
func SelfLinkExtractor ¶
func SelfLinkExtractor() reference.ExtractValueFn
SelfLinkExtractor extracts URI of the resources from "status.atProvider.selfLink" which is quite common among all GCP resources.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.