location

package
v1.44.1-0...-fd58215 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheSupportedLocations

func CacheSupportedLocations(ctx context.Context, env *azure.Environment)

CacheSupportedLocations attempts to retrieve the supported locations from the Azure MetaData Service and caches them, for used in enhanced validation

func DiffSuppressFunc

func DiffSuppressFunc(_, old, new string, _ *pluginsdk.ResourceData) bool

func EnhancedValidate

func EnhancedValidate(i interface{}, k string) ([]string, []error)

EnhancedValidate returns a validation function which attempts to validate the location against the list of Locations supported by this Azure Location.

NOTE: this is best-effort - if the users offline, or the API doesn't return it we'll fall back to the original approach

func HashCode

func HashCode(location interface{}) int

func Normalize

func Normalize(input string) string

Normalize transforms the human readable Azure Region/Location names (e.g. `West US`) into the canonical value to allow comparisons between user-code and API Responses

func NormalizeNilable

func NormalizeNilable(input *string) string

NormalizeNilable normalizes the Location field even if it's nil to ensure this field can always have a value

func Schema

func Schema() *pluginsdk.Schema

Schema returns the default Schema which should be used for Location fields where these are Required and Cannot be Changed

func SchemaComputed

func SchemaComputed() *pluginsdk.Schema

func SchemaOptional

func SchemaOptional() *pluginsdk.Schema

SchemaOptional returns the Schema for a Location field where this can be optionally specified

func SchemaWithoutForceNew

func SchemaWithoutForceNew() *pluginsdk.Schema

Schema returns the Schema which should be used for Location fields where these are Required and can be changed

func StateFunc

func StateFunc(location interface{}) string

Types

type SupportedLocations

type SupportedLocations struct {
	// Locations is a list of Locations which are supported on this Azure Endpoint.
	// This could be nil when the user is offline, or the Azure MetaData Service does not have this
	// information and as such this should be used as best-effort, rather than guaranteed
	Locations *[]string
}

Jump to

Keyboard shortcuts

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