Documentation ¶
Index ¶
- func ExpandZones(v []interface{}) *[]string
- func FlattenZones(v *[]string) []interface{}
- func MergeSchema(a map[string]*pluginsdk.Schema, b map[string]*pluginsdk.Schema) map[string]*pluginsdk.Schema
- func NormalizeLocation(input interface{}) string
- func QuotedStringSlice(strs []string) string
- func SchemaLocation() *pluginsdk.Schema
- func SchemaLocationForDataSource() *pluginsdk.Schema
- func SchemaLocationOptional() *pluginsdk.Schema
- func SchemaMultipleZones() *pluginsdk.Schema
- func SchemaResourceGroupName() *pluginsdk.Schema
- func SchemaResourceGroupNameDeprecated() *pluginsdk.Schema
- func SchemaResourceGroupNameDeprecatedComputed() *pluginsdk.Schema
- func SchemaResourceGroupNameDiffSuppress() *pluginsdk.Schema
- func SchemaResourceGroupNameForDataSource() *pluginsdk.Schema
- func SchemaResourceGroupNameOptional() *pluginsdk.Schema
- func SchemaResourceGroupNameOptionalComputed() *pluginsdk.Schema
- func SchemaResourceGroupNameSetOptional() *pluginsdk.Schema
- func SchemaSingleZone() *pluginsdk.Schema
- func SchemaZoneComputed() *pluginsdk.Schema
- func SchemaZones() *pluginsdk.Schema
- func SchemaZonesComputed() *pluginsdk.Schema
- func SplitSku(sku string) (string, int32, error)
- func ValidateResourceGroupName(v interface{}, k string) (warnings []string, errors []error)
- func ValidateResourceID(i interface{}, k string) (warnings []string, errors []error)
- func ValidateResourceIDOrEmpty(i interface{}, k string) (_ []string, errors []error)
- type ResourceID
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 ¶
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 SchemaLocationOptional ¶
func SchemaMultipleZones ¶
func SchemaResourceGroupName ¶
func SchemaSingleZone ¶
func SchemaZoneComputed ¶
func SchemaZones ¶
func SchemaZonesComputed ¶
func ValidateResourceID ¶
func ValidateResourceIDOrEmpty ¶
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 ...