From 1489a4f09b1f8a46f456325925dfbffe2f99a265 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Mohanty Date: Thu, 13 Dec 2018 00:53:54 +0200 Subject: [PATCH 1/3] add support for eu-north-1 region --- aws/data_source_aws_cloudtrail_service_account.go | 1 + aws/data_source_aws_elb_hosted_zone_id.go | 1 + aws/data_source_aws_elb_service_account.go | 1 + aws/hosted_zones.go | 1 + 4 files changed, 4 insertions(+) diff --git a/aws/data_source_aws_cloudtrail_service_account.go b/aws/data_source_aws_cloudtrail_service_account.go index 33574a033f3..ef4edb7cadd 100644 --- a/aws/data_source_aws_cloudtrail_service_account.go +++ b/aws/data_source_aws_cloudtrail_service_account.go @@ -25,6 +25,7 @@ var cloudTrailServiceAccountPerRegionMap = map[string]string{ "eu-west-3": "262312530599", "sa-east-1": "814480443879", "cn-northwest-1": "681348832753", + "eu-north-1": "829690693026", } func dataSourceAwsCloudTrailServiceAccount() *schema.Resource { diff --git a/aws/data_source_aws_elb_hosted_zone_id.go b/aws/data_source_aws_elb_hosted_zone_id.go index 6bcf74bdf99..d7ce9c60e85 100644 --- a/aws/data_source_aws_elb_hosted_zone_id.go +++ b/aws/data_source_aws_elb_hosted_zone_id.go @@ -25,6 +25,7 @@ var elbHostedZoneIdPerRegionMap = map[string]string{ "sa-east-1": "Z2P70J7HTTTPLU", "us-gov-west-1": "048591011584", "cn-north-1": "638102146993", + "eu-north-1": "Z23TAZ6LKFMNIO", } func dataSourceAwsElbHostedZoneId() *schema.Resource { diff --git a/aws/data_source_aws_elb_service_account.go b/aws/data_source_aws_elb_service_account.go index 639ad733922..d8594c6a3f6 100644 --- a/aws/data_source_aws_elb_service_account.go +++ b/aws/data_source_aws_elb_service_account.go @@ -27,6 +27,7 @@ var elbAccountIdPerRegionMap = map[string]string{ "us-gov-west-1": "048591011584", "us-west-1": "027434742980", "us-west-2": "797873946194", + "eu-north-1": "897822967062", } func dataSourceAwsElbServiceAccount() *schema.Resource { diff --git a/aws/hosted_zones.go b/aws/hosted_zones.go index a401c02c6b2..92ae0f79b92 100644 --- a/aws/hosted_zones.go +++ b/aws/hosted_zones.go @@ -22,6 +22,7 @@ var hostedZoneIDsMap = map[string]string{ "ca-central-1": "Z1QDHH18159H29", "sa-east-1": "Z7KQH4QJS55SO", "us-gov-west-1": "Z31GFT0UA1I2HV", + "eu-north-1": "Z3BAZG2TWCNX0D", } // Returns the hosted zone ID for an S3 website endpoint region. This can be From 7702fb0825db8a0112b6109e0dfbddcda95a8cd4 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Mohanty Date: Thu, 13 Dec 2018 01:09:51 +0200 Subject: [PATCH 2/3] Update data sources that return per-region AWS system information for missing regions --- ...a_source_aws_cloudtrail_service_account.go | 17 +++++++------- aws/data_source_aws_elb_hosted_zone_id.go | 9 ++++---- aws/data_source_aws_elb_service_account.go | 4 +++- aws/hosted_zones.go | 23 ++++++++++--------- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/aws/data_source_aws_cloudtrail_service_account.go b/aws/data_source_aws_cloudtrail_service_account.go index ef4edb7cadd..cbc6e6dafb3 100644 --- a/aws/data_source_aws_cloudtrail_service_account.go +++ b/aws/data_source_aws_cloudtrail_service_account.go @@ -9,23 +9,24 @@ import ( // See http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html var cloudTrailServiceAccountPerRegionMap = map[string]string{ - "us-east-1": "086441151436", - "us-east-2": "475085895292", - "us-west-1": "388731089494", - "us-west-2": "113285607260", - "ap-south-1": "977081816279", + "ap-northeast-1": "216624486486", "ap-northeast-2": "492519147666", + "ap-northeast-3": "765225791966", + "ap-south-1": "977081816279", "ap-southeast-1": "903692715234", "ap-southeast-2": "284668455005", - "ap-northeast-1": "216624486486", "ca-central-1": "819402241893", + "cn-northwest-1": "681348832753", "eu-central-1": "035351147821", + "eu-north-1": "829690693026", "eu-west-1": "859597730677", "eu-west-2": "282025262664", "eu-west-3": "262312530599", "sa-east-1": "814480443879", - "cn-northwest-1": "681348832753", - "eu-north-1": "829690693026", + "us-east-1": "086441151436", + "us-east-2": "475085895292", + "us-west-1": "388731089494", + "us-west-2": "113285607260", } func dataSourceAwsCloudTrailServiceAccount() *schema.Resource { diff --git a/aws/data_source_aws_elb_hosted_zone_id.go b/aws/data_source_aws_elb_hosted_zone_id.go index d7ce9c60e85..3fec3f2eab3 100644 --- a/aws/data_source_aws_elb_hosted_zone_id.go +++ b/aws/data_source_aws_elb_hosted_zone_id.go @@ -10,22 +10,23 @@ import ( var elbHostedZoneIdPerRegionMap = map[string]string{ "ap-northeast-1": "Z14GRHDCWA56QT", "ap-northeast-2": "ZWKZPGTI48KDX", + "ap-northeast-3": "Z5LXEXXYW11ES", "ap-south-1": "ZP97RAFLXTNZK", "ap-southeast-1": "Z1LMS91P8CMLE5", "ap-southeast-2": "Z1GM3OXH4ZPM65", "ca-central-1": "ZQSVJUPU6J1EY", + "cn-north-1": "638102146993", "eu-central-1": "Z215JYRZR1TBD5", + "eu-north-1": "Z23TAZ6LKFMNIO", "eu-west-1": "Z32O12XQLNTSW2", "eu-west-2": "ZHURV8PSTC4K8", "eu-west-3": "Z3Q77PNBQS71R4", + "sa-east-1": "Z2P70J7HTTTPLU", "us-east-1": "Z35SXDOTRQ7X7K", "us-east-2": "Z3AADJGX6KTTL2", + "us-gov-west-1": "048591011584", "us-west-1": "Z368ELLRRE2KJ0", "us-west-2": "Z1H1FL5HABSF5", - "sa-east-1": "Z2P70J7HTTTPLU", - "us-gov-west-1": "048591011584", - "cn-north-1": "638102146993", - "eu-north-1": "Z23TAZ6LKFMNIO", } func dataSourceAwsElbHostedZoneId() *schema.Resource { diff --git a/aws/data_source_aws_elb_service_account.go b/aws/data_source_aws_elb_service_account.go index d8594c6a3f6..32d2620a621 100644 --- a/aws/data_source_aws_elb_service_account.go +++ b/aws/data_source_aws_elb_service_account.go @@ -11,6 +11,7 @@ import ( var elbAccountIdPerRegionMap = map[string]string{ "ap-northeast-1": "582318560864", "ap-northeast-2": "600734575887", + "ap-northeast-3": "765225791966", "ap-south-1": "718504428378", "ap-southeast-1": "114774131450", "ap-southeast-2": "783225319266", @@ -18,16 +19,17 @@ var elbAccountIdPerRegionMap = map[string]string{ "cn-north-1": "638102146993", "cn-northwest-1": "037604701340", "eu-central-1": "054676820928", + "eu-north-1": "897822967062", "eu-west-1": "156460612806", "eu-west-2": "652711504416", "eu-west-3": "009996457667", "sa-east-1": "507241528517", "us-east-1": "127311923021", "us-east-2": "033677994240", + "us-gov-east-1": "190560391635", "us-gov-west-1": "048591011584", "us-west-1": "027434742980", "us-west-2": "797873946194", - "eu-north-1": "897822967062", } func dataSourceAwsElbServiceAccount() *schema.Resource { diff --git a/aws/hosted_zones.go b/aws/hosted_zones.go index 92ae0f79b92..c7f1b2e832f 100644 --- a/aws/hosted_zones.go +++ b/aws/hosted_zones.go @@ -6,23 +6,24 @@ import "fmt" // http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints // 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", - "eu-west-2": "Z3GKZC51ZF0DB4", - "eu-west-3": "Z3R1K369G5AVDG", - "eu-central-1": "Z21DNDUVLTQW6Q", + "ap-northeast-1": "Z2M4EHUR26P7ZW", + "ap-northeast-2": "Z3W03O7B5YMIYP", + "ap-northeast-3": "Z2YQB5RD63NC85", "ap-south-1": "Z11RGJOFQNVJUP", "ap-southeast-1": "Z3O0J2DXBE1FTB", "ap-southeast-2": "Z1WCIGYICN2BYD", - "ap-northeast-1": "Z2M4EHUR26P7ZW", - "ap-northeast-2": "Z3W03O7B5YMIYP", "ca-central-1": "Z1QDHH18159H29", + "eu-central-1": "Z21DNDUVLTQW6Q", + "eu-north-1": "Z3BAZG2TWCNX0D", + "eu-west-1": "Z1BKCTXD74EZPE", + "eu-west-2": "Z3GKZC51ZF0DB4", + "eu-west-3": "Z3R1K369G5AVDG", "sa-east-1": "Z7KQH4QJS55SO", + "us-east-1": "Z3AQBSTGFYJSTF", + "us-east-2": "Z2O1EMRO9K5GLX", "us-gov-west-1": "Z31GFT0UA1I2HV", - "eu-north-1": "Z3BAZG2TWCNX0D", + "us-west-1": "Z2F56UZL2M1ACD", + "us-west-2": "Z3BJ6K6RIION7M", } // Returns the hosted zone ID for an S3 website endpoint region. This can be From 49f0e323182b1c74c3fa963ea7d0f7cb0378ec83 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Mohanty Date: Thu, 13 Dec 2018 15:07:15 +0100 Subject: [PATCH 3/3] FIX: IDs for elb and hosted zones --- aws/data_source_aws_elb_service_account.go | 2 +- aws/hosted_zones.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aws/data_source_aws_elb_service_account.go b/aws/data_source_aws_elb_service_account.go index 32d2620a621..8565c8e1830 100644 --- a/aws/data_source_aws_elb_service_account.go +++ b/aws/data_source_aws_elb_service_account.go @@ -11,7 +11,7 @@ import ( var elbAccountIdPerRegionMap = map[string]string{ "ap-northeast-1": "582318560864", "ap-northeast-2": "600734575887", - "ap-northeast-3": "765225791966", + "ap-northeast-3": "383597477331", "ap-south-1": "718504428378", "ap-southeast-1": "114774131450", "ap-southeast-2": "783225319266", diff --git a/aws/hosted_zones.go b/aws/hosted_zones.go index c7f1b2e832f..9274c1af3bd 100644 --- a/aws/hosted_zones.go +++ b/aws/hosted_zones.go @@ -21,6 +21,7 @@ var hostedZoneIDsMap = map[string]string{ "sa-east-1": "Z7KQH4QJS55SO", "us-east-1": "Z3AQBSTGFYJSTF", "us-east-2": "Z2O1EMRO9K5GLX", + "us-gov-east-1": "Z31GFT0UA1I2HV", "us-gov-west-1": "Z31GFT0UA1I2HV", "us-west-1": "Z2F56UZL2M1ACD", "us-west-2": "Z3BJ6K6RIION7M",