aztft

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryId

func QueryId(idStr string, rt string, allowAPI bool) (string, error)

QueryId queries a given ARM resource ID and its resource type, returns the matched Terraform resource ID.

Types

type Type added in v0.3.0

type Type struct {
	AzureId armid.ResourceId
	TFType  string
}

func QueryType

func QueryType(idStr string, allowAPI bool) (types []Type, exact bool, err error)

QueryType queries a given ARM resource ID and returns a list of potential matched Terraform resource type. It firstly statically search the known resource mappings. If there are multiple matches and the "allowAPI" is true, it will further call Azure API to retrieve additionl information about this resource and return the exact match. Additionally, if allowAPI is true and this resource maps to multiple TF resources, then multiple Types will be returned.

func QueryTypeAndId

func QueryTypeAndId(idStr string, allowAPI bool) (types []Type, ids []string, exact bool, err error)

QueryTypeAndId is similar to QueryType, except it also returns the Terraform resource ID (having same length as the types).

Jump to

Keyboard shortcuts

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