Skip to content

Commit 858fc75

Browse files
committed
revert ap-east-1 addition
1 parent c5394a5 commit 858fc75

18 files changed

+14
-118
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ module "secure_baseline" {
5353
5454
providers = {
5555
aws = aws
56-
aws.ap-east-1 = aws.ap-east-1
5756
aws.ap-northeast-1 = aws.ap-northeast-1
5857
aws.ap-northeast-2 = aws.ap-northeast-2
5958
aws.ap-northeast-3 = aws.ap-northeast-3
@@ -166,7 +165,7 @@ This module is composed of several submodules and each of which can be used inde
166165
| support\_iam\_role\_policy\_name | The name of the support role policy. | `string` | `"IAM-Support-Role"` | no |
167166
| support\_iam\_role\_principal\_arns | List of ARNs of the IAM principal elements by which the support role could be assumed. | `list` | n/a | yes |
168167
| tags | Specifies object tags key and value. This applies to all resources created by this module. | `map` | `{}` | no |
169-
| target\_regions | A list of regions to set up with this module. | `list` | <pre>[<br> "ap-east-1",<br> "ap-northeast-1",<br> "ap-northeast-2",<br> "ap-south-1",<br> "ap-southeast-1",<br> "ap-southeast-2",<br> "ca-central-1",<br> "eu-central-1",<br> "eu-north-1",<br> "eu-west-1",<br> "eu-west-2",<br> "eu-west-3",<br> "sa-east-1",<br> "us-east-1",<br> "us-east-2",<br> "us-west-1",<br> "us-west-2"<br>]</pre> | no |
168+
| target\_regions | A list of regions to set up with this module. | `list` | <pre>[<br> "ap-northeast-1",<br> "ap-northeast-2",<br> "ap-south-1",<br> "ap-southeast-1",<br> "ap-southeast-2",<br> "ca-central-1",<br> "eu-central-1",<br> "eu-north-1",<br> "eu-west-1",<br> "eu-west-2",<br> "eu-west-3",<br> "sa-east-1",<br> "us-east-1",<br> "us-east-2",<br> "us-west-1",<br> "us-west-2"<br>]</pre> | no |
170169
| use\_external\_audit\_log\_bucket | A boolean that indicates whether the specific audit log bucket already exists. Create a new S3 bucket if it is set to false. | `bool` | `false` | no |
171170
| vpc\_iam\_role\_name | The name of the IAM Role which VPC Flow Logs will use. | `string` | `"VPC-Flow-Logs-Publisher"` | no |
172171
| vpc\_iam\_role\_policy\_name | The name of the IAM Role Policy which VPC Flow Logs will use. | `string` | `"VPC-Flow-Logs-Publish-Policy"` | no |

config_baselines.tf

+1-17
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,6 @@ resource "aws_iam_role_policy_attachment" "recorder_read_policy" {
8181
# Needs to be set up in each region.
8282
# Global resource types are only recorded in the region specified by var.region.
8383
# --------------------------------------------------------------------------------------------------
84-
module "config_baseline_ap-east-1" {
85-
source = "./modules/config-baseline"
86-
87-
providers = {
88-
aws = aws.ap-east-1
89-
}
90-
91-
enabled = contains(var.target_regions, "ap-east-1")
92-
iam_role_arn = aws_iam_role.recorder.arn
93-
s3_bucket_name = local.audit_log_bucket_id
94-
s3_key_prefix = var.config_s3_bucket_key_prefix
95-
delivery_frequency = var.config_delivery_frequency
96-
sns_topic_name = var.config_sns_topic_name
97-
include_global_resource_types = var.region == "ap-east-1"
98-
tags = var.tags
99-
}
100-
10184
module "config_baseline_ap-northeast-1" {
10285
source = "./modules/config-baseline"
10386

@@ -554,3 +537,4 @@ resource "aws_config_configuration_aggregator" "organization" {
554537

555538
tags = var.tags
556539
}
540+

examples/external-bucket/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module "secure_baseline" {
2222

2323
providers = {
2424
aws = aws
25-
aws.ap-east-1 = aws.ap-east-1
2625
aws.ap-northeast-1 = aws.ap-northeast-1
2726
aws.ap-northeast-2 = aws.ap-northeast-2
2827
aws.ap-northeast-3 = aws.ap-northeast-3
@@ -42,3 +41,4 @@ module "secure_baseline" {
4241
aws.us-west-2 = aws.us-west-2
4342
}
4443
}
44+

examples/external-bucket/regions.tf

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
# Reference: https://docs.aws.amazon.com/general/latest/gr/rande.html
44
# --------------------------------------------------------------------------------------------------
55

6-
provider "aws" {
7-
access_key = var.access_key
8-
secret_key = var.secret_key
9-
region = "ap-east-1"
10-
alias = "ap-east-1"
11-
}
12-
136
provider "aws" {
147
access_key = var.access_key
158
secret_key = var.secret_key
@@ -128,3 +121,4 @@ provider "aws" {
128121
region = "us-west-2"
129122
alias = "us-west-2"
130123
}
124+

examples/organization/master/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module "secure_baseline" {
3737

3838
providers = {
3939
aws = aws
40-
aws.ap-east-1 = aws.ap-east-1
4140
aws.ap-northeast-1 = aws.ap-northeast-1
4241
aws.ap-northeast-2 = aws.ap-northeast-2
4342
aws.ap-northeast-3 = aws.ap-northeast-3
@@ -57,3 +56,4 @@ module "secure_baseline" {
5756
aws.us-west-2 = aws.us-west-2
5857
}
5958
}
59+

examples/organization/master/regions.tf

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
# Reference: https://docs.aws.amazon.com/general/latest/gr/rande.html
44
# --------------------------------------------------------------------------------------------------
55

6-
provider "aws" {
7-
access_key = var.access_key
8-
secret_key = var.secret_key
9-
region = "ap-east-1"
10-
alias = "ap-east-1"
11-
}
12-
136
provider "aws" {
147
access_key = var.access_key
158
secret_key = var.secret_key
@@ -128,3 +121,4 @@ provider "aws" {
128121
region = "us-west-2"
129122
alias = "us-west-2"
130123
}
124+

examples/organization/member/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ module "secure_baseline" {
3131

3232
providers = {
3333
aws = aws
34-
aws.ap-east-1 = aws.ap-east-1
3534
aws.ap-northeast-1 = aws.ap-northeast-1
3635
aws.ap-northeast-2 = aws.ap-northeast-2
3736
aws.ap-northeast-3 = aws.ap-northeast-3
@@ -51,3 +50,4 @@ module "secure_baseline" {
5150
aws.us-west-2 = aws.us-west-2
5251
}
5352
}
53+

examples/organization/member/regions.tf

+1-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
# Reference: https://docs.aws.amazon.com/general/latest/gr/rande.html
44
# --------------------------------------------------------------------------------------------------
55

6-
provider "aws" {
7-
access_key = var.access_key
8-
secret_key = var.secret_key
9-
region = "ap-east-1"
10-
alias = "ap-east-1"
11-
}
12-
13-
146
provider "aws" {
157
access_key = var.access_key
168
secret_key = var.secret_key
@@ -129,3 +121,4 @@ provider "aws" {
129121
region = "us-west-2"
130122
alias = "us-west-2"
131123
}
124+

examples/select-region/main.tf

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ module "secure_baseline" {
2929
# all providers still need to be passed to the module.
3030
providers = {
3131
aws = aws
32-
aws.ap-east-1 = aws.ap-east-1
3332
aws.ap-northeast-1 = aws.ap-northeast-1
3433
aws.ap-northeast-2 = aws.ap-northeast-2
3534
aws.ap-northeast-3 = aws.ap-northeast-3

examples/select-region/regions.tf

+1-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
# Reference: https://docs.aws.amazon.com/general/latest/gr/rande.html
44
# --------------------------------------------------------------------------------------------------
55

6-
provider "aws" {
7-
access_key = var.access_key
8-
secret_key = var.secret_key
9-
region = "ap-east-1"
10-
alias = "ap-east-1"
11-
}
12-
13-
146
provider "aws" {
157
access_key = var.access_key
168
secret_key = var.secret_key
@@ -129,3 +121,4 @@ provider "aws" {
129121
region = "us-west-2"
130122
alias = "us-west-2"
131123
}
124+

examples/simple/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ module "secure_baseline" {
2626

2727
providers = {
2828
aws = aws
29-
aws.ap-east-1 = aws.ap-east-1
3029
aws.ap-northeast-1 = aws.ap-northeast-1
3130
aws.ap-northeast-2 = aws.ap-northeast-2
3231
aws.ap-northeast-3 = aws.ap-northeast-3
@@ -46,3 +45,4 @@ module "secure_baseline" {
4645
aws.us-west-2 = aws.us-west-2
4746
}
4847
}
48+

examples/simple/regions.tf

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
# Reference: https://docs.aws.amazon.com/general/latest/gr/rande.html
44
# --------------------------------------------------------------------------------------------------
55

6-
provider "aws" {
7-
access_key = var.access_key
8-
secret_key = var.secret_key
9-
region = "ap-east-1"
10-
alias = "ap-east-1"
11-
}
12-
136
provider "aws" {
147
access_key = var.access_key
158
secret_key = var.secret_key
@@ -128,3 +121,4 @@ provider "aws" {
128121
region = "us-west-2"
129122
alias = "us-west-2"
130123
}
124+

guardduty_baselines.tf

-15
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,6 @@ locals {
88
guardduty_member_accounts = var.member_accounts
99
}
1010

11-
module "guardduty_baseline_ap-east-1" {
12-
source = "./modules/guardduty-baseline"
13-
14-
providers = {
15-
aws = aws.ap-east-1
16-
}
17-
18-
enabled = contains(var.target_regions, "ap-east-1")
19-
disable_email_notification = var.guardduty_disable_email_notification
20-
finding_publishing_frequency = var.guardduty_finding_publishing_frequency
21-
invitation_message = var.guardduty_invitation_message
22-
master_account_id = local.guardduty_master_account_id
23-
member_accounts = local.guardduty_member_accounts
24-
}
25-
2611
module "guardduty_baseline_ap-northeast-1" {
2712
source = "./modules/guardduty-baseline"
2813

outputs.tf

+1-8
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ output "config_configuration_recorder" {
5858
description = "The configuration recorder in each region."
5959

6060
value = {
61-
"ap-east-1" = module.config_baseline_ap-east-1.configuration_recorder
6261
"ap-northeast-1" = module.config_baseline_ap-northeast-1.configuration_recorder
6362
"ap-northeast-2" = module.config_baseline_ap-northeast-2.configuration_recorder
6463
"ap-south-1" = module.config_baseline_ap-south-1.configuration_recorder
@@ -81,7 +80,6 @@ output "config_sns_topic" {
8180
description = "The SNS topic that AWS Config delivers notifications to."
8281

8382
value = {
84-
"ap-east-1" = module.config_baseline_ap-east-1.config_sns_topic
8583
"ap-northeast-1" = module.config_baseline_ap-northeast-1.config_sns_topic
8684
"ap-northeast-2" = module.config_baseline_ap-northeast-2.config_sns_topic
8785
"ap-south-1" = module.config_baseline_ap-south-1.config_sns_topic
@@ -109,7 +107,6 @@ output "guardduty_detector" {
109107
description = "The GuardDuty detector in each region."
110108

111109
value = {
112-
"ap-east-1" = module.guardduty_baseline_ap-east-1.guardduty_detector
113110
"ap-northeast-1" = module.guardduty_baseline_ap-northeast-1.guardduty_detector
114111
"ap-northeast-2" = module.guardduty_baseline_ap-northeast-2.guardduty_detector
115112
"ap-south-1" = module.guardduty_baseline_ap-south-1.guardduty_detector
@@ -160,7 +157,6 @@ output "vpc_flow_logs_group" {
160157
description = "The CloudWatch Logs log group which stores VPC Flow Logs in each region."
161158

162159
value = {
163-
"ap-east-1" = module.vpc_baseline_ap-east-1.vpc_flow_logs_group
164160
"ap-northeast-1" = module.vpc_baseline_ap-northeast-1.vpc_flow_logs_group
165161
"ap-northeast-2" = module.vpc_baseline_ap-northeast-2.vpc_flow_logs_group
166162
"ap-south-1" = module.vpc_baseline_ap-south-1.vpc_flow_logs_group
@@ -184,7 +180,6 @@ output "default_vpc" {
184180
description = "The default VPC."
185181

186182
value = {
187-
"ap-east-1" = module.vpc_baseline_ap-east-1.default_vpc
188183
"ap-northeast-1" = module.vpc_baseline_ap-northeast-1.default_vpc
189184
"ap-northeast-2" = module.vpc_baseline_ap-northeast-2.default_vpc
190185
"ap-south-1" = module.vpc_baseline_ap-south-1.default_vpc
@@ -208,7 +203,6 @@ output "default_security_group" {
208203
description = "The ID of the default security group."
209204

210205
value = {
211-
"ap-east-1" = module.vpc_baseline_ap-east-1.default_security_group
212206
"ap-northeast-1" = module.vpc_baseline_ap-northeast-1.default_security_group
213207
"ap-northeast-2" = module.vpc_baseline_ap-northeast-2.default_security_group
214208
"ap-south-1" = module.vpc_baseline_ap-south-1.default_security_group
@@ -232,7 +226,6 @@ output "default_network_acl" {
232226
description = "The default network ACL."
233227

234228
value = {
235-
"ap-east-1" = module.vpc_baseline_ap-east-1.default_network_acl
236229
"ap-northeast-1" = module.vpc_baseline_ap-northeast-1.default_network_acl
237230
"ap-northeast-2" = module.vpc_baseline_ap-northeast-2.default_network_acl
238231
"ap-south-1" = module.vpc_baseline_ap-south-1.default_network_acl
@@ -256,7 +249,6 @@ output "default_route_table" {
256249
description = "The default route table."
257250

258251
value = {
259-
"ap-east-1" = module.vpc_baseline_ap-east-1.default_route_table
260252
"ap-northeast-1" = module.vpc_baseline_ap-northeast-1.default_route_table
261253
"ap-northeast-2" = module.vpc_baseline_ap-northeast-2.default_route_table
262254
"ap-south-1" = module.vpc_baseline_ap-south-1.default_route_table
@@ -275,3 +267,4 @@ output "default_route_table" {
275267
"us-west-2" = module.vpc_baseline_us-west-2.default_route_table
276268
}
277269
}
270+

providers.tf

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
provider "aws" {
77
}
88

9-
provider "aws" {
10-
alias = "ap-east-1"
11-
}
12-
139
provider "aws" {
1410
alias = "ap-northeast-1"
1511
}
@@ -77,3 +73,4 @@ provider "aws" {
7773
provider "aws" {
7874
alias = "us-west-2"
7975
}
76+

securityhub.tf

-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
# --------------------------------------------------------------------------------------------------
22
# SecurityHub Baseline
33
# --------------------------------------------------------------------------------------------------
4-
5-
module "securityhub_baseline_ap-east-1" {
6-
source = "./modules/securityhub-baseline"
7-
8-
providers = {
9-
aws = aws.ap-east-1
10-
}
11-
12-
enabled = contains(var.target_regions, "ap-east-1")
13-
securityhub_enable_cis_standard = var.securityhub_enable_cis_standard
14-
securityhub_enable_pci_dss_standard = var.securityhub_enable_pci_dss_standard
15-
securityhub_enable_aws_foundational_standard = var.securityhub_enable_aws_foundational_standard
16-
}
17-
184
module "securityhub_baseline_ap-northeast-1" {
195
source = "./modules/securityhub-baseline"
206

variables.tf

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ variable "member_accounts" {
3232
variable "target_regions" {
3333
description = "A list of regions to set up with this module."
3434
default = [
35-
"ap-east-1",
3635
"ap-northeast-1",
3736
"ap-northeast-2",
3837
"ap-south-1",

vpc_baselines.tf

+1-15
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,6 @@ resource "aws_iam_role_policy" "vpc_flow_logs_publish_policy" {
4444
# Needs to be set up in each region.
4545
# --------------------------------------------------------------------------------------------------
4646

47-
module "vpc_baseline_ap-east-1" {
48-
source = "./modules/vpc-baseline"
49-
50-
providers = {
51-
aws = aws.ap-east-1
52-
}
53-
54-
enabled = contains(var.target_regions, "ap-east-1")
55-
vpc_log_group_name = var.vpc_log_group_name
56-
vpc_flow_logs_iam_role_arn = aws_iam_role.vpc_flow_logs_publisher.arn
57-
vpc_log_retention_in_days = var.vpc_log_retention_in_days
58-
59-
tags = var.tags
60-
}
61-
6247
module "vpc_baseline_ap-northeast-1" {
6348
source = "./modules/vpc-baseline"
6449

@@ -298,3 +283,4 @@ module "vpc_baseline_us-west-2" {
298283

299284
tags = var.tags
300285
}
286+

0 commit comments

Comments
 (0)