diff --git a/builtin/providers/aws/hosted_zones.go b/builtin/providers/aws/hosted_zones.go index fb95505ea1..a99bd22fdf 100644 --- a/builtin/providers/aws/hosted_zones.go +++ b/builtin/providers/aws/hosted_zones.go @@ -9,6 +9,7 @@ var hostedZoneIDsMap = map[string]string{ "us-west-1": "Z2F56UZL2M1ACD", "eu-west-1": "Z1BKCTXD74EZPE", "eu-central-1": "Z21DNDUVLTQW6Q", + "ap-south-1": "Z11RGJOFQNVJUP", "ap-southeast-1": "Z3O0J2DXBE1FTB", "ap-southeast-2": "Z1WCIGYICN2BYD", "ap-northeast-1": "Z2M4EHUR26P7ZW", diff --git a/builtin/providers/aws/resource_aws_s3_bucket.go b/builtin/providers/aws/resource_aws_s3_bucket.go index 27f8d753aa..6897f1e7f8 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket.go +++ b/builtin/providers/aws/resource_aws_s3_bucket.go @@ -1029,7 +1029,7 @@ func WebsiteDomainUrl(region string) string { // Frankfurt(and probably future) regions uses different syntax for website endpoints // http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html - if region == "eu-central-1" { + if region == "eu-central-1" || region == "ap-south-1" { return fmt.Sprintf("s3-website.%s.amazonaws.com", region) } diff --git a/builtin/providers/aws/website_endpoint_url_test.go b/builtin/providers/aws/website_endpoint_url_test.go index 2193ff5124..e4cba63124 100644 --- a/builtin/providers/aws/website_endpoint_url_test.go +++ b/builtin/providers/aws/website_endpoint_url_test.go @@ -12,6 +12,7 @@ var websiteEndpoints = []struct { {"us-west-1", "bucket-name.s3-website-us-west-1.amazonaws.com"}, {"eu-west-1", "bucket-name.s3-website-eu-west-1.amazonaws.com"}, {"eu-central-1", "bucket-name.s3-website.eu-central-1.amazonaws.com"}, + {"ap-south-1", "bucket-name.s3-website.ap-south-1.amazonaws.com"}, {"ap-southeast-1", "bucket-name.s3-website-ap-southeast-1.amazonaws.com"}, {"ap-northeast-1", "bucket-name.s3-website-ap-northeast-1.amazonaws.com"}, {"ap-southeast-2", "bucket-name.s3-website-ap-southeast-2.amazonaws.com"},