Documentation ¶
Index ¶
- func CacheSupportedLocations(ctx context.Context, env *azure.Environment)
- func DiffSuppressFunc(_, old, new string, _ *pluginsdk.ResourceData) bool
- func EnhancedValidate(i interface{}, k string) ([]string, []error)
- func HashCode(location interface{}) int
- func Normalize(input string) string
- func NormalizeNilable(input *string) string
- func Schema() *pluginsdk.Schema
- func SchemaComputed() *pluginsdk.Schema
- func SchemaOptional() *pluginsdk.Schema
- func SchemaWithoutForceNew() *pluginsdk.Schema
- func StateFunc(location interface{}) string
- type SupportedLocations
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 ¶
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 Normalize ¶
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 ¶
NormalizeNilable normalizes the Location field even if it's nil to ensure this field can always have a value
func Schema ¶
Schema returns the default Schema which should be used for Location fields where these are Required and Cannot be Changed
func SchemaComputed ¶
func SchemaOptional ¶
SchemaOptional returns the Schema for a Location field where this can be optionally specified
func SchemaWithoutForceNew ¶
Schema returns the Schema which should be used for Location fields where these are Required and can be changed
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 }