aws: Add missing metadata for us-east-2
This commit is contained in:
parent
94cbc37312
commit
4b36bc3210
|
@ -18,6 +18,7 @@ var elbAccountIdPerRegionMap = map[string]string{
|
|||
"eu-west-1": "156460612806",
|
||||
"sa-east-1": "507241528517",
|
||||
"us-east-1": "127311923021",
|
||||
"us-east-2": "033677994240",
|
||||
"us-gov-west": "048591011584",
|
||||
"us-west-1": "027434742980",
|
||||
"us-west-2": "797873946194",
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
// See http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-enable-logging
|
||||
var redshiftServiceAccountPerRegionMap = map[string]string{
|
||||
"us-east-1": "193672423079",
|
||||
"us-east-2": "391106570357",
|
||||
"us-west-1": "262260360010",
|
||||
"us-west-2": "902366379725",
|
||||
"ap-south-1": "865932855811",
|
||||
|
|
|
@ -5,6 +5,7 @@ package aws
|
|||
// It currently cannot be generated from the API json.
|
||||
var hostedZoneIDsMap = map[string]string{
|
||||
"us-east-1": "Z3AQBSTGFYJSTF",
|
||||
"us-east-2": "Z2O1EMRO9K5GLX",
|
||||
"us-west-2": "Z3BJ6K6RIION7M",
|
||||
"us-west-1": "Z2F56UZL2M1ACD",
|
||||
"eu-west-1": "Z1BKCTXD74EZPE",
|
||||
|
|
|
@ -1107,11 +1107,30 @@ func WebsiteDomainUrl(region string) string {
|
|||
|
||||
// New regions uses different syntax for website endpoints
|
||||
// http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html
|
||||
if region == "eu-central-1" || region == "ap-south-1" || region == "ap-northeast-2" {
|
||||
return fmt.Sprintf("s3-website.%s.amazonaws.com", region)
|
||||
if isOldRegion(region) {
|
||||
return fmt.Sprintf("s3-website-%s.amazonaws.com", region)
|
||||
}
|
||||
return fmt.Sprintf("s3-website.%s.amazonaws.com", region)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("s3-website-%s.amazonaws.com", region)
|
||||
func isOldRegion(region string) bool {
|
||||
oldRegions := []string{
|
||||
"ap-northeast-1",
|
||||
"ap-southeast-1",
|
||||
"ap-southeast-2",
|
||||
"eu-west-1",
|
||||
"sa-east-1",
|
||||
"us-east-1",
|
||||
"us-gov-west-1",
|
||||
"us-west-1",
|
||||
"us-west-2",
|
||||
}
|
||||
for _, r := range oldRegions {
|
||||
if region == r {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func resourceAwsS3BucketAclUpdate(s3conn *s3.S3, d *schema.ResourceData) error {
|
||||
|
|
Loading…
Reference in New Issue