Skip to content

Commit

Permalink
Add missing eu-north-1 Amazon Redshift audit logging account ID (and …
Browse files Browse the repository at this point in the history
…others).
  • Loading branch information
Kit Ewbank authored and Kit Ewbank committed Sep 18, 2019
1 parent ed7a47f commit 2954561
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
1 change: 1 addition & 0 deletions aws/data_source_aws_cloudtrail_service_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion aws/data_source_aws_elastic_beanstalk_hosted_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions aws/data_source_aws_elb_hosted_zone_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",

This comment has been minimized.

Copy link
@jukie

jukie Sep 30, 2019

Contributor

Was this removed intentionally?

This comment has been minimized.

Copy link
@ewbankkit

ewbankkit Oct 1, 2019

Contributor

@jukie Yes, the removed value is not a Route 53 hosted zone ID, it's the AWS account ID for access log delivery.
My guess is that it was incorrectly inserted into this map as it's mentioned on the GovCloud ELB User Guide page: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-elb.html.
I can't find the correct Route 53 hosted zone ID documented anywhere.

This comment has been minimized.

Copy link
@jukie

jukie Oct 1, 2019

Contributor

After my comment I looked into this and found the same. I'm not sure if it's intentionally left out but I've reached out to AWS support about this and if I get a response will open a PR to add it back.

"us-west-1": "Z368ELLRRE2KJ0",
"us-west-2": "Z1H1FL5HABSF5",
}
Expand Down
8 changes: 7 additions & 1 deletion aws/data_source_aws_redshift_service_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,30 @@ 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",
"us-west-1": "262260360010",
"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",
Expand Down
3 changes: 3 additions & 0 deletions aws/hosted_zones.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2954561

Please sign in to comment.