From 2954561946419cba3f973b9904bf2df959cf9d38 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 17 Sep 2019 11:52:21 -0400 Subject: [PATCH] Add missing eu-north-1 Amazon Redshift audit logging account ID (and others). --- .github/CONTRIBUTING.md | 6 +++--- aws/data_source_aws_cloudtrail_service_account.go | 1 + aws/data_source_aws_elastic_beanstalk_hosted_zone.go | 6 +++++- aws/data_source_aws_elb_hosted_zone_id.go | 5 +++-- aws/data_source_aws_redshift_service_account.go | 8 +++++++- aws/hosted_zones.go | 3 +++ 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 84aa1002f51..05c5c340ba9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -316,9 +316,9 @@ manually sourced values from documentation. - [ ] Check [Regions and Endpoints ELB regions](https://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region) and add Route53 Hosted Zone ID if available to `aws/data_source_aws_elb_hosted_zone_id.go` - [ ] Check [Regions and Endpoints S3 website endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) and add Route53 Hosted Zone ID if available to `aws/hosted_zones.go` - - [ ] Check [CloudTrail Supported Regions docs](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html) and add AWS Account ID if available to `aws/data_source_aws_cloudtrail_service_account.go` + - [ ] Check [CloudTrail Supported Regions docs](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html#cloudtrail-supported-regions) and add AWS Account ID if available to `aws/data_source_aws_cloudtrail_service_account.go` - [ ] Check [Elastic Load Balancing Access Logs docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) and add Elastic Load Balancing Account ID if available to `aws/data_source_aws_elb_service_account.go` - - [ ] Check [Redshift Database Audit Logging docs](https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html) and add AWS Account ID if available to `aws/data_source_aws_redshift_service_account.go` + - [ ] Check [Redshift Database Audit Logging docs](https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-bucket-permissions) and add AWS Account ID if available to `aws/data_source_aws_redshift_service_account.go` - [ ] Check [Regions and Endpoints Elastic Beanstalk](https://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) and add Route53 Hosted Zone ID if available to `aws/data_source_aws_elastic_beanstalk_hosted_zone.go` ### Common Review Items @@ -340,7 +340,7 @@ The following Go language resources provide common coding preferences that may b #### Resource Contribution Guidelines -The following resource checks need to be addressed before your contribution can be merged. The exclusion of any applicable check may result in a delayed time to merge. +The following resource checks need to be addressed before your contribution can be merged. The exclusion of any applicable check may result in a delayed time to merge. - [ ] __Passes Testing__: All code and documentation changes must pass unit testing, code linting, and website link testing. Resource code changes must pass all acceptance testing for the resource. - [ ] __Avoids API Calls Across Account, Region, and Service Boundaries__: Resources should not implement cross-account, cross-region, or cross-service API calls. diff --git a/aws/data_source_aws_cloudtrail_service_account.go b/aws/data_source_aws_cloudtrail_service_account.go index b5143391a4a..2c03d2ad708 100644 --- a/aws/data_source_aws_cloudtrail_service_account.go +++ b/aws/data_source_aws_cloudtrail_service_account.go @@ -19,6 +19,7 @@ var cloudTrailServiceAccountPerRegionMap = map[string]string{ "ap-southeast-1": "903692715234", "ap-southeast-2": "284668455005", "ca-central-1": "819402241893", + "cn-north-1": "193415116832", "cn-northwest-1": "681348832753", "eu-central-1": "035351147821", "eu-north-1": "829690693026", diff --git a/aws/data_source_aws_elastic_beanstalk_hosted_zone.go b/aws/data_source_aws_elastic_beanstalk_hosted_zone.go index a69ea6bc8fe..218eaf3846e 100644 --- a/aws/data_source_aws_elastic_beanstalk_hosted_zone.go +++ b/aws/data_source_aws_elastic_beanstalk_hosted_zone.go @@ -6,12 +6,14 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -// See # http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region +// See http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region var elasticBeanstalkHostedZoneIds = map[string]string{ "ap-southeast-1": "Z16FZ9L249IFLT", "ap-southeast-2": "Z2PCDNR3VC2G1N", + "ap-east-1": "ZPWYUBWRU171A", "ap-northeast-1": "Z1R25G3KIG2GBW", "ap-northeast-2": "Z3JE5OI70TWKCP", + "ap-northeast-3": "ZNE5GEY1TIAGY", "ap-south-1": "Z18NTBI3Y7N9TZ", "ca-central-1": "ZJFCZL7SSZB5I", "eu-central-1": "Z1FRNW7UH4DEZJ", @@ -25,6 +27,8 @@ var elasticBeanstalkHostedZoneIds = map[string]string{ "us-east-2": "Z14LCN19Q5QHIC", "us-west-1": "Z1LQECGX5PH1X", "us-west-2": "Z38NKT9BP95V3O", + "us-gov-east-1": "Z35TSARG0EJ4VU", + "us-gov-west-1": "Z4KAURWC4UUUG", } func dataSourceAwsElasticBeanstalkHostedZone() *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 63ce6a9ddf9..712036c5ffd 100644 --- a/aws/data_source_aws_elb_hosted_zone_id.go +++ b/aws/data_source_aws_elb_hosted_zone_id.go @@ -7,6 +7,7 @@ import ( ) // See http://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region +// See https://docs.amazonaws.cn/en_us/general/latest/gr/rande.html#elb_region var elbHostedZoneIdPerRegionMap = map[string]string{ "ap-east-1": "Z3DQVH9N71FHZ0", "ap-northeast-1": "Z14GRHDCWA56QT", @@ -16,7 +17,8 @@ var elbHostedZoneIdPerRegionMap = map[string]string{ "ap-southeast-1": "Z1LMS91P8CMLE5", "ap-southeast-2": "Z1GM3OXH4ZPM65", "ca-central-1": "ZQSVJUPU6J1EY", - "cn-north-1": "638102146993", + "cn-north-1": "Z3BX2TMKNYI13Y", + "cn-northwest-1": "Z3BX2TMKNYI13Y", "eu-central-1": "Z215JYRZR1TBD5", "eu-north-1": "Z23TAZ6LKFMNIO", "eu-west-1": "Z32O12XQLNTSW2", @@ -26,7 +28,6 @@ var elbHostedZoneIdPerRegionMap = map[string]string{ "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", } diff --git a/aws/data_source_aws_redshift_service_account.go b/aws/data_source_aws_redshift_service_account.go index 77a18fd6dd0..5ab5025b761 100644 --- a/aws/data_source_aws_redshift_service_account.go +++ b/aws/data_source_aws_redshift_service_account.go @@ -7,7 +7,9 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -// See http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-enable-logging +// See http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-bucket-permissions +// See https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-redshift.html +// See https://docs.amazonaws.cn/en_us/redshift/latest/mgmt/db-auditing.html#db-auditing-bucket-permissions var redshiftServiceAccountPerRegionMap = map[string]string{ "us-east-1": "193672423079", "us-east-2": "391106570357", @@ -15,16 +17,20 @@ var redshiftServiceAccountPerRegionMap = map[string]string{ "us-west-2": "902366379725", "ap-east-1": "313564881002", "ap-south-1": "865932855811", + "ap-northeast-3": "090321488786", "ap-northeast-2": "760740231472", "ap-southeast-1": "361669875840", "ap-southeast-2": "762762565011", "ap-northeast-1": "404641285394", "ca-central-1": "907379612154", + "cn-north-1": "111890595117", "cn-northwest-1": "660998842044", "eu-central-1": "053454850223", "eu-west-1": "210876761215", "eu-west-2": "307160386991", "eu-west-3": "915173422425", + "eu-north-1": "729911121831", + "me-south-1": "013126148197", "sa-east-1": "075028567923", "us-gov-east-1": "665727464434", "us-gov-west-1": "665727464434", diff --git a/aws/hosted_zones.go b/aws/hosted_zones.go index b5060d06538..bb50d2381b8 100644 --- a/aws/hosted_zones.go +++ b/aws/hosted_zones.go @@ -5,6 +5,9 @@ import "fmt" // This list is copied from // http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints // It currently cannot be generated from the API json. +// See https://docs.amazonaws.cn/en_us/general/latest/gr/rande.html#s3_website_region_endpoints +// See https://docs.aws.amazon.com/pt_br/govcloud-us/latest/ug-east/using-govcloud-endpoints.html +// See https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/using-govcloud-endpoints.html var hostedZoneIDsMap = map[string]string{ "ap-east-1": "ZNB98KWMFR0R6", "ap-northeast-1": "Z2M4EHUR26P7ZW",