Skip to content

Commit

Permalink
Merge commit 'eee5aa6259d0349eeae17ec47e711b3d8780f9fb' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Jun 18, 2024
2 parents 5e95d1a + eee5aa6 commit 3038ea9
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions names/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package names
import (
"fmt"
"log"
"slices"
"strings"

"github.com/hashicorp/terraform-provider-aws/names/data"
Expand Down Expand Up @@ -170,8 +171,55 @@ const (

// AWS ISOB (US) partition's regions.
USISOBEast1RegionID = "us-isob-east-1" // US ISOB East (Ohio).

// AWS ISOF partition's regions.
EUISOEWest1RegionID = "eu-isoe-west-1" // EU ISOE West.
)

var allRegionIDs = []string{
AFSouth1RegionID,
APEast1RegionID,
APNortheast1RegionID,
APNortheast2RegionID,
APNortheast3RegionID,
APSouth1RegionID,
APSouth2RegionID,
APSoutheast1RegionID,
APSoutheast2RegionID,
APSoutheast3RegionID,
APSoutheast4RegionID,
CACentral1RegionID,
CAWest1RegionID,
EUCentral1RegionID,
EUCentral2RegionID,
EUNorth1RegionID,
EUSouth1RegionID,
EUSouth2RegionID,
EUWest1RegionID,
EUWest2RegionID,
EUWest3RegionID,
ILCentral1RegionID,
MECentral1RegionID,
MESouth1RegionID,
SAEast1RegionID,
USEast1RegionID,
USEast2RegionID,
USWest1RegionID,
USWest2RegionID,
CNNorth1RegionID,
CNNorthwest1RegionID,
USGovEast1RegionID,
USGovWest1RegionID,
USISOEast1RegionID,
USISOWest1RegionID,
USISOBEast1RegionID,
EUISOEWest1RegionID,
}

func Regions() []string {
return slices.Clone(allRegionIDs)
}

func DNSSuffixForPartition(partition string) string {
switch partition {
case "":
Expand Down Expand Up @@ -218,6 +266,8 @@ func PartitionForRegion(region string) string {
return ISOPartitionID
case USISOBEast1RegionID:
return ISOBPartitionID
case EUISOEWest1RegionID:
return ISOEPartitionID
case USGovEast1RegionID, USGovWest1RegionID:
return USGovCloudPartitionID
default:
Expand Down

0 comments on commit 3038ea9

Please sign in to comment.