Documentation ¶
Index ¶
- func CacheSupportedLocations(ctx context.Context, resourceManagerEndpoint string)
- func DiffSuppressFunc(_, old, new string, _ *schema.ResourceData) bool
- func EnhancedValidate(i interface{}, k string) ([]string, []error)
- func Normalize(input string) string
- func NormalizeNilable(input *string) string
- func StateFunc(location interface{}) string
- type SupportedLocations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheSupportedLocations ¶
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 ¶
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
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 }