location

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 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, _ *schema.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() *schema.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() *schema.Schema

func SchemaOptional

func SchemaOptional() *schema.Schema

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

func SchemaWithoutForceNew

func SchemaWithoutForceNew() *schema.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

This section is empty.

Jump to

Keyboard shortcuts

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