@@ -17,6 +17,7 @@ type Region struct {
1717 COSRegion string
1818 Zones []string
1919 SysTypes []string
20+ VPCZones []string
2021}
2122
2223// Regions holds the regions for IBM Power VS, and descriptions used during the survey.
@@ -27,34 +28,39 @@ var Regions = map[string]Region{
2728 COSRegion : "us-south" ,
2829 Zones : []string {"dal10" , "dal12" },
2930 SysTypes : []string {"s922" , "e980" },
31+ VPCZones : []string {"us-south-1" , "us-south-2" , "us-south-3" },
3032 },
3133 "eu-de" : {
3234 Description : "Frankfurt, Germany" ,
3335 VPCRegion : "eu-de" ,
3436 COSRegion : "eu-de" ,
3537 Zones : []string {"eu-de-1" , "eu-de-2" },
3638 SysTypes : []string {"s922" , "e980" },
39+ VPCZones : []string {"eu-de-2" , "eu-de-3" },
3740 },
3841 "mad" : {
3942 Description : "Madrid, Spain" ,
4043 VPCRegion : "eu-es" ,
4144 COSRegion : "eu-de" , // @HACK - PowerVS says COS not supported in this region
4245 Zones : []string {"mad02" , "mad04" },
4346 SysTypes : []string {"s1022" },
47+ VPCZones : []string {"eu-es-1" , "eu-es-2" },
4448 },
4549 "sao" : {
4650 Description : "São Paulo, Brazil" ,
4751 VPCRegion : "br-sao" ,
4852 COSRegion : "br-sao" ,
4953 Zones : []string {"sao04" },
5054 SysTypes : []string {"s922" , "e980" },
55+ VPCZones : []string {"br-sao-1" , "br-sao-2" },
5156 },
5257 "wdc" : {
5358 Description : "Washington DC, USA" ,
5459 VPCRegion : "us-east" ,
5560 COSRegion : "us-east" ,
5661 Zones : []string {"wdc06" , "wdc07" },
5762 SysTypes : []string {"s922" , "e980" },
63+ VPCZones : []string {"us-east-1" , "us-east-2" , "us-east-3" },
5864 },
5965}
6066
@@ -143,6 +149,15 @@ func AllKnownSysTypes() sets.Set[string] {
143149 return sysTypes
144150}
145151
152+ // AvailableVPCZones returns the known VPC zones for a specified region.
153+ func AvailableVPCZones (region string ) ([]string , error ) {
154+ knownRegion , ok := Regions [region ]
155+ if ! ok {
156+ return nil , fmt .Errorf ("unknown region name provided" )
157+ }
158+ return knownRegion .VPCZones , nil
159+ }
160+
146161// COSRegionForVPCRegion returns the corresponding COS region for the given VPC region.
147162func COSRegionForVPCRegion (vpcRegion string ) (string , error ) {
148163 for r := range Regions {
0 commit comments