azure

package
v2.85.6 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandZones

func ExpandZones(v []interface{}) *[]string

func FlattenZones

func FlattenZones(v *[]string) []interface{}

func MergeSchema

func MergeSchema(a map[string]*pluginsdk.Schema, b map[string]*pluginsdk.Schema) map[string]*pluginsdk.Schema

shared schema

func NormalizeLocation

func NormalizeLocation(input interface{}) string

azure.NormalizeLocation is a function which normalises human-readable region/location names (e.g. "West US") to the values used and returned by the Azure API (e.g. "westus"). In state we track the API internal version as it is easier to go from the human form to the canonical form than the other way around.

func QuotedStringSlice

func QuotedStringSlice(strs []string) string

QuotedStringSlice formats a string slice into a quoted string containing all segments passed in a slice (e.g. string[]{"one", "two", "three"} will return {"one", "two" or "three"}). Useful for error messages with multiple possible values.

func SchemaLocation

func SchemaLocation() *pluginsdk.Schema

func SchemaLocationForDataSource

func SchemaLocationForDataSource() *pluginsdk.Schema

func SchemaLocationOptional

func SchemaLocationOptional() *pluginsdk.Schema

func SchemaMultipleZones

func SchemaMultipleZones() *pluginsdk.Schema

func SchemaResourceGroupName

func SchemaResourceGroupName() *pluginsdk.Schema

func SchemaResourceGroupNameDeprecated

func SchemaResourceGroupNameDeprecated() *pluginsdk.Schema

func SchemaResourceGroupNameDeprecatedComputed

func SchemaResourceGroupNameDeprecatedComputed() *pluginsdk.Schema

func SchemaResourceGroupNameDiffSuppress

func SchemaResourceGroupNameDiffSuppress() *pluginsdk.Schema

func SchemaResourceGroupNameForDataSource

func SchemaResourceGroupNameForDataSource() *pluginsdk.Schema

func SchemaResourceGroupNameOptional

func SchemaResourceGroupNameOptional() *pluginsdk.Schema

func SchemaResourceGroupNameOptionalComputed

func SchemaResourceGroupNameOptionalComputed() *pluginsdk.Schema

func SchemaResourceGroupNameSetOptional

func SchemaResourceGroupNameSetOptional() *pluginsdk.Schema

func SchemaSingleZone

func SchemaSingleZone() *pluginsdk.Schema

func SchemaZoneComputed

func SchemaZoneComputed() *pluginsdk.Schema

func SchemaZones

func SchemaZones() *pluginsdk.Schema

func SchemaZonesComputed

func SchemaZonesComputed() *pluginsdk.Schema

func SplitSku

func SplitSku(sku string) (string, int32, error)

func ValidateResourceGroupName

func ValidateResourceGroupName(v interface{}, k string) (warnings []string, errors []error)

func ValidateResourceID

func ValidateResourceID(i interface{}, k string) (warnings []string, errors []error)

func ValidateResourceIDOrEmpty

func ValidateResourceIDOrEmpty(i interface{}, k string) (_ []string, errors []error)

true for a resource ID or an empty string

Types

type ResourceID

type ResourceID struct {
	SubscriptionID    string
	ResourceGroup     string
	Provider          string
	SecondaryProvider string
	Path              map[string]string
}

ResourceID represents a parsed long-form Azure Resource Manager ID with the Subscription ID, Resource Group and the Provider as top- level fields, and other key-value pairs available via a map in the Path field.

func ParseAzureResourceID

func ParseAzureResourceID(id string) (*ResourceID, error)

ParseAzureResourceID converts a long-form Azure Resource Manager ID into a ResourceID. We make assumptions about the structure of URLs, which is obviously not good, but the best thing available given the SDK.

func ParseAzureResourceIDWithoutSubscription

func ParseAzureResourceIDWithoutSubscription(id string) (*ResourceID, error)

ParseAzureResourceIDWithoutSubscription parses Azure Resource ID's that are not prefixed with a Subscription ID. Typically these are for administrative resources that are not bound to a particular subscription. Note that these IDs are also unlikely to have a resourceGroup element, so this is not populated automatically into the returned ResourceID, but can be popped in cases it does exist in the path. These IDs are expected to begin with '/providers/[provider name]/'

func (*ResourceID) PopSegment

func (id *ResourceID) PopSegment(name string) (string, error)

PopSegment retrieves a segment from the Path and returns it if found it removes it from the Path then return the value if not found, this returns nil

func (*ResourceID) ValidateNoEmptySegments

func (id *ResourceID) ValidateNoEmptySegments(sourceId string) error

ValidateNoEmptySegments validates ...

Jump to

Keyboard shortcuts

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