From 7b61192b1fff50f59b1b468d8150c49ae1101b0a Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Thu, 24 Aug 2023 13:13:17 -0600 Subject: [PATCH] feat: add "coming soon" regions to allow list (#5107) --- cmd/get_locations.go | 28 ++++++++++++++++++++++++++++ cmd/get_locations_test.go | 24 ++++++++++++++++++++++++ pkg/helpers/azure_locations.go | 5 +++++ 3 files changed, 57 insertions(+) diff --git a/cmd/get_locations.go b/cmd/get_locations.go index 252fc1bec3..47e0dfe930 100644 --- a/cmd/get_locations.go +++ b/cmd/get_locations.go @@ -46,6 +46,12 @@ var ( germanyCentralName = "germanycentral" germanyNortheastDisplayName = "Germany Northeast" germanyNortheastName = "germanynortheast" + israelCentralDisplayName = "Israel Central" + israelCentralName = "israelcentral" + italyNorthDisplayName = "Italy North" + italyNorthName = "italynorth" + spainCentralDisplayName = "Spain Central" + spainCentralName = "spaincentral" usDodCentralDisplayName = "US DoD Central" usDodCentralName = "usdodcentral" usDodEastDisplayName = "US Dod East" @@ -247,6 +253,28 @@ func (glc *LocationsCmd) run(cmd *cobra.Command, args []string) error { Latitude: ¬Available, Longitude: ¬Available, }, + // Coming soon regions + { + ID: ¬Available, + Name: &israelCentralName, + DisplayName: &israelCentralDisplayName, + Latitude: ¬Available, + Longitude: ¬Available, + }, + { + ID: ¬Available, + Name: &italyNorthName, + DisplayName: &italyNorthDisplayName, + Latitude: ¬Available, + Longitude: ¬Available, + }, + { + ID: ¬Available, + Name: &spainCentralName, + DisplayName: &spainCentralDisplayName, + Latitude: ¬Available, + Longitude: ¬Available, + }, } // Add special locations if they aren't already in the list for _, s := range specialLocations { diff --git a/cmd/get_locations_test.go b/cmd/get_locations_test.go index 2d89a14779..43278d5920 100644 --- a/cmd/get_locations_test.go +++ b/cmd/get_locations_test.go @@ -108,6 +108,9 @@ func ExampleLocationsCmd_run_humanOutput() { // eastus2euap East US 2 EUAP (Canary) N/A N/A // germanycentral Germany Central N/A N/A // germanynortheast Germany Northeast N/A N/A + // israelcentral Israel Central N/A N/A + // italynorth Italy North N/A N/A + // spaincentral Spain Central N/A N/A // usdodcentral US DoD Central N/A N/A // usdodeast US Dod East N/A N/A // usgovarizona US Gov Arizona N/A N/A @@ -221,6 +224,27 @@ func ExampleLocationsCmd_run_jsonOutput() { // }, // { // "id": "N/A", + // "name": "israelcentral", + // "displayName": "Israel Central", + // "latitude": "N/A", + // "longitude": "N/A" + // }, + // { + // "id": "N/A", + // "name": "italynorth", + // "displayName": "Italy North", + // "latitude": "N/A", + // "longitude": "N/A" + // }, + // { + // "id": "N/A", + // "name": "spaincentral", + // "displayName": "Spain Central", + // "latitude": "N/A", + // "longitude": "N/A" + // }, + // { + // "id": "N/A", // "name": "usdodcentral", // "displayName": "US DoD Central", // "latitude": "N/A", diff --git a/pkg/helpers/azure_locations.go b/pkg/helpers/azure_locations.go index 79396c9b08..b6934648e0 100644 --- a/pkg/helpers/azure_locations.go +++ b/pkg/helpers/azure_locations.go @@ -17,6 +17,7 @@ func GetAzureLocations() []string { "australiasoutheast", "brazilsouth", "brazilsoutheast", + "brazilus", "canadacentral", "canadaeast", "centralindia", @@ -38,6 +39,8 @@ func GetAzureLocations() []string { "germanynorth", "germanynortheast", "germanywestcentral", + "israelcentral", + "italynorth", "japaneast", "japanwest", "jioindiacentral", @@ -48,12 +51,14 @@ func GetAzureLocations() []string { "northeurope", "norwayeast", "norwaywest", + "polandcentral", "qatarcentral", "southafricanorth", "southafricawest", "southcentralus", "southeastasia", "southindia", + "spaincentral", "swedencentral", "switzerlandnorth", "switzerlandwest",