Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ap-southeast-3 aws region #330

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module "secure_baseline" {
aws.ap-south-1 = aws.ap-south-1
aws.ap-southeast-1 = aws.ap-southeast-1
aws.ap-southeast-2 = aws.ap-southeast-2
aws.ap-southeast-3 = aws.ap-southeast-3
aws.ca-central-1 = aws.ca-central-1
aws.eu-central-1 = aws.eu-central-1
aws.eu-north-1 = aws.eu-north-1
Expand Down
14 changes: 14 additions & 0 deletions analyzer_baselines.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ module "analyzer_baseline_ap-southeast-2" {
tags = var.tags
}

module "analyzer_baseline_ap-southeast-3" {
count = local.is_analyzer_enabled && contains(var.target_regions, "ap-southeast-3") ? 1 : 0
source = "./modules/analyzer-baseline"

providers = {
aws = aws.ap-southeast-3
}

analyzer_name = var.analyzer_name
is_organization = local.is_master_account

tags = var.tags
}

module "analyzer_baseline_ca-central-1" {
count = local.is_analyzer_enabled && contains(var.target_regions, "ca-central-1") ? 1 : 0
source = "./modules/analyzer-baseline"
Expand Down
26 changes: 26 additions & 0 deletions config_baselines.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ locals {
one(module.config_baseline_ap-south-1[*].config_sns_topic),
one(module.config_baseline_ap-southeast-1[*].config_sns_topic),
one(module.config_baseline_ap-southeast-2[*].config_sns_topic),
one(module.config_baseline_ap-southeast-3[*].config_sns_topic),
one(module.config_baseline_ca-central-1[*].config_sns_topic),
one(module.config_baseline_eu-central-1[*].config_sns_topic),
one(module.config_baseline_eu-north-1[*].config_sns_topic),
Expand Down Expand Up @@ -226,6 +227,27 @@ module "config_baseline_ap-southeast-2" {
depends_on = [aws_s3_bucket_policy.audit_log]
}

module "config_baseline_ap-southeast-3" {
count = var.config_baseline_enabled && contains(var.target_regions, "ap-southeast-3") ? 1 : 0
source = "./modules/config-baseline"

providers = {
aws = aws.ap-southeast-3
}

iam_role_arn = one(aws_iam_role.recorder[*].arn)
s3_bucket_name = local.audit_log_bucket_id
s3_key_prefix = var.config_s3_bucket_key_prefix
delivery_frequency = var.config_delivery_frequency
sns_topic_name = var.config_sns_topic_name
sns_topic_kms_master_key_id = var.config_sns_topic_kms_master_key_id
include_global_resource_types = var.config_global_resources_all_regions ? true : var.region == "ap-southeast-3"

tags = var.tags

depends_on = [aws_s3_bucket_policy.audit_log]
}

module "config_baseline_ca-central-1" {
count = var.config_baseline_enabled && contains(var.target_regions, "ca-central-1") ? 1 : 0
source = "./modules/config-baseline"
Expand Down Expand Up @@ -481,6 +503,7 @@ resource "aws_config_config_rule" "iam_mfa" {
module.config_baseline_ap-south-1,
module.config_baseline_ap-southeast-1,
module.config_baseline_ap-southeast-2,
module.config_baseline_ap-southeast-3,
module.config_baseline_ca-central-1,
module.config_baseline_eu-central-1,
module.config_baseline_eu-north-1,
Expand Down Expand Up @@ -516,6 +539,7 @@ resource "aws_config_config_rule" "unused_credentials" {
module.config_baseline_ap-south-1,
module.config_baseline_ap-southeast-1,
module.config_baseline_ap-southeast-2,
module.config_baseline_ap-southeast-3,
module.config_baseline_ca-central-1,
module.config_baseline_eu-central-1,
module.config_baseline_eu-north-1,
Expand Down Expand Up @@ -556,6 +580,7 @@ resource "aws_config_config_rule" "user_no_policies" {
module.config_baseline_ap-south-1,
module.config_baseline_ap-southeast-1,
module.config_baseline_ap-southeast-2,
module.config_baseline_ap-southeast-3,
module.config_baseline_ca-central-1,
module.config_baseline_eu-central-1,
module.config_baseline_eu-north-1,
Expand Down Expand Up @@ -596,6 +621,7 @@ resource "aws_config_config_rule" "no_policies_with_full_admin_access" {
module.config_baseline_ap-south-1,
module.config_baseline_ap-southeast-1,
module.config_baseline_ap-southeast-2,
module.config_baseline_ap-southeast-3,
module.config_baseline_ca-central-1,
module.config_baseline_eu-central-1,
module.config_baseline_eu-north-1,
Expand Down
9 changes: 9 additions & 0 deletions ebs_baselines.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ module "ebs_baseline_ap-southeast-2" {
}
}

module "ebs_baseline_ap-southeast-3" {
count = contains(var.target_regions, "ap-southeast-3") ? 1 : 0
source = "./modules/ebs-baseline"

providers = {
aws = aws.ap-southeast-3
}
}

module "ebs_baseline_ca-central-1" {
count = contains(var.target_regions, "ca-central-1") ? 1 : 0
source = "./modules/ebs-baseline"
Expand Down
1 change: 1 addition & 0 deletions examples/external-bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module "secure_baseline" {
aws.ap-south-1 = aws.ap-south-1
aws.ap-southeast-1 = aws.ap-southeast-1
aws.ap-southeast-2 = aws.ap-southeast-2
aws.ap-southeast-3 = aws.ap-southeast-3
aws.ca-central-1 = aws.ca-central-1
aws.eu-central-1 = aws.eu-central-1
aws.eu-north-1 = aws.eu-north-1
Expand Down
5 changes: 5 additions & 0 deletions examples/external-bucket/regions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ provider "aws" {
alias = "ap-southeast-2"
}

provider "aws" {
region = "ap-southeast-3"
alias = "ap-southeast-3"
}

provider "aws" {
region = "ca-central-1"
alias = "ca-central-1"
Expand Down
1 change: 1 addition & 0 deletions examples/organization/master/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module "secure_baseline" {
aws.ap-south-1 = aws.ap-south-1
aws.ap-southeast-1 = aws.ap-southeast-1
aws.ap-southeast-2 = aws.ap-southeast-2
aws.ap-southeast-3 = aws.ap-southeast-3
aws.ca-central-1 = aws.ca-central-1
aws.eu-central-1 = aws.eu-central-1
aws.eu-north-1 = aws.eu-north-1
Expand Down
5 changes: 5 additions & 0 deletions examples/organization/master/regions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ provider "aws" {
alias = "ap-southeast-2"
}

provider "aws" {
region = "ap-southeast-3"
alias = "ap-southeast-3"
}

provider "aws" {
region = "ca-central-1"
alias = "ca-central-1"
Expand Down
1 change: 1 addition & 0 deletions examples/organization/member/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module "secure_baseline" {
aws.ap-south-1 = aws.ap-south-1
aws.ap-southeast-1 = aws.ap-southeast-1
aws.ap-southeast-2 = aws.ap-southeast-2
aws.ap-southeast-3 = aws.ap-southeast-3
aws.ca-central-1 = aws.ca-central-1
aws.eu-central-1 = aws.eu-central-1
aws.eu-north-1 = aws.eu-north-1
Expand Down
5 changes: 5 additions & 0 deletions examples/organization/member/regions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ provider "aws" {
alias = "ap-southeast-2"
}

provider "aws" {
region = "ap-southeast-3"
alias = "ap-southeast-3"
}

provider "aws" {
region = "ca-central-1"
alias = "ca-central-1"
Expand Down
1 change: 1 addition & 0 deletions examples/select-region/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module "secure_baseline" {
aws.ap-south-1 = aws.ap-south-1
aws.ap-southeast-1 = aws.ap-southeast-1
aws.ap-southeast-2 = aws.ap-southeast-2
aws.ap-southeast-3 = aws.ap-southeast-3
aws.ca-central-1 = aws.ca-central-1
aws.eu-central-1 = aws.eu-central-1
aws.eu-north-1 = aws.eu-north-1
Expand Down
5 changes: 5 additions & 0 deletions examples/select-region/regions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ provider "aws" {
alias = "ap-southeast-2"
}

provider "aws" {
region = "ap-southeast-3"
alias = "ap-southeast-3"
}

provider "aws" {
region = "ca-central-1"
alias = "ca-central-1"
Expand Down
1 change: 1 addition & 0 deletions examples/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module "secure_baseline" {
aws.ap-south-1 = aws.ap-south-1
aws.ap-southeast-1 = aws.ap-southeast-1
aws.ap-southeast-2 = aws.ap-southeast-2
aws.ap-southeast-3 = aws.ap-southeast-3
aws.ca-central-1 = aws.ca-central-1
aws.eu-central-1 = aws.eu-central-1
aws.eu-north-1 = aws.eu-north-1
Expand Down
5 changes: 5 additions & 0 deletions examples/simple/regions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ provider "aws" {
alias = "ap-southeast-2"
}

provider "aws" {
region = "ap-southeast-3"
alias = "ap-southeast-3"
}

provider "aws" {
region = "ca-central-1"
alias = "ca-central-1"
Expand Down
17 changes: 17 additions & 0 deletions guardduty_baselines.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,23 @@ module "guardduty_baseline_ap-southeast-2" {
tags = var.tags
}

module "guardduty_baseline_ap-southeast-3" {
source = "./modules/guardduty-baseline"

providers = {
aws = aws.ap-southeast-3
}

count = contains(var.target_regions, "ap-southeast-3") && var.guardduty_enabled ? 1 : 0
disable_email_notification = var.guardduty_disable_email_notification
finding_publishing_frequency = var.guardduty_finding_publishing_frequency
invitation_message = var.guardduty_invitation_message
master_account_id = local.guardduty_master_account_id
member_accounts = local.guardduty_member_accounts

tags = var.tags
}

module "guardduty_baseline_ca-central-1" {
count = contains(var.target_regions, "ca-central-1") && var.guardduty_enabled ? 1 : 0
source = "./modules/guardduty-baseline"
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ terraform {
configuration_aliases = [
aws.ap-northeast-1, aws.ap-northeast-2, aws.ap-northeast-3,
aws.ap-south-1,
aws.ap-southeast-1, aws.ap-southeast-2,
aws.ap-southeast-1, aws.ap-southeast-2, aws.ap-southeast-3,
aws.ca-central-1,
aws.eu-central-1,
aws.eu-north-1,
Expand Down
8 changes: 8 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ output "config_configuration_recorder" {
"ap-south-1" = one(module.config_baseline_ap-south-1[*].configuration_recorder)
"ap-southeast-1" = one(module.config_baseline_ap-southeast-1[*].configuration_recorder)
"ap-southeast-2" = one(module.config_baseline_ap-southeast-2[*].configuration_recorder)
"ap-southeast-3" = one(module.config_baseline_ap-southeast-3[*].configuration_recorder)
"ca-central-1" = one(module.config_baseline_ca-central-1[*].configuration_recorder)
"eu-central-1" = one(module.config_baseline_eu-central-1[*].configuration_recorder)
"eu-west-1" = one(module.config_baseline_eu-west-1[*].configuration_recorder)
Expand All @@ -87,6 +88,7 @@ output "config_sns_topic" {
"ap-south-1" = one(module.config_baseline_ap-south-1[*].config_sns_topic)
"ap-southeast-1" = one(module.config_baseline_ap-southeast-1[*].config_sns_topic)
"ap-southeast-2" = one(module.config_baseline_ap-southeast-2[*].config_sns_topic)
"ap-southeast-3" = one(module.config_baseline_ap-southeast-3[*].config_sns_topic)
"ca-central-1" = one(module.config_baseline_ca-central-1[*].config_sns_topic)
"eu-central-1" = one(module.config_baseline_eu-central-1[*].config_sns_topic)
"eu-north-1" = one(module.config_baseline_eu-north-1[*].config_sns_topic)
Expand Down Expand Up @@ -115,6 +117,7 @@ output "guardduty_detector" {
"ap-south-1" = one(module.guardduty_baseline_ap-south-1[*].guardduty_detector)
"ap-southeast-1" = one(module.guardduty_baseline_ap-southeast-1[*].guardduty_detector)
"ap-southeast-2" = one(module.guardduty_baseline_ap-southeast-2[*].guardduty_detector)
"ap-southeast-3" = one(module.guardduty_baseline_ap-southeast-3[*].guardduty_detector)
"ca-central-1" = one(module.guardduty_baseline_ca-central-1[*].guardduty_detector)
"eu-central-1" = one(module.guardduty_baseline_eu-central-1[*].guardduty_detector)
"eu-north-1" = one(module.guardduty_baseline_eu-north-1[*].guardduty_detector)
Expand Down Expand Up @@ -156,6 +159,7 @@ output "vpc_flow_logs_group" {
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].vpc_flow_logs_group)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].vpc_flow_logs_group)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].vpc_flow_logs_group)
"ap-southeast-3" = one(module.vpc_baseline_ap-southeast-3[*].vpc_flow_logs_group)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].vpc_flow_logs_group)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].vpc_flow_logs_group)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].vpc_flow_logs_group)
Expand All @@ -180,6 +184,7 @@ output "default_vpc" {
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].default_vpc)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].default_vpc)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].default_vpc)
"ap-southeast-3" = one(module.vpc_baseline_ap-southeast-3[*].default_vpc)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].default_vpc)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].default_vpc)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].default_vpc)
Expand All @@ -204,6 +209,7 @@ output "default_security_group" {
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].default_security_group)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].default_security_group)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].default_security_group)
"ap-southeast-3" = one(module.vpc_baseline_ap-southeast-3[*].default_security_group)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].default_security_group)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].default_security_group)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].default_security_group)
Expand All @@ -228,6 +234,7 @@ output "default_network_acl" {
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].default_network_acl)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].default_network_acl)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].default_network_acl)
"ap-southeast-3" = one(module.vpc_baseline_ap-southeast-3[*].default_network_acl)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].default_network_acl)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].default_network_acl)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].default_network_acl)
Expand All @@ -252,6 +259,7 @@ output "default_route_table" {
"ap-south-1" = one(module.vpc_baseline_ap-south-1[*].default_route_table)
"ap-southeast-1" = one(module.vpc_baseline_ap-southeast-1[*].default_route_table)
"ap-southeast-2" = one(module.vpc_baseline_ap-southeast-2[*].default_route_table)
"ap-southeast-3" = one(module.vpc_baseline_ap-southeast-3[*].default_route_table)
"ca-central-1" = one(module.vpc_baseline_ca-central-1[*].default_route_table)
"eu-central-1" = one(module.vpc_baseline_eu-central-1[*].default_route_table)
"eu-north-1" = one(module.vpc_baseline_eu-north-1[*].default_route_table)
Expand Down
17 changes: 17 additions & 0 deletions securityhub_baselines.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,23 @@ module "securityhub_baseline_ap-southeast-2" {
member_accounts = local.securityhub_member_accounts
}

module "securityhub_baseline_ap-southeast-3" {
count = contains(var.target_regions, "ap-southeast-3") && var.securityhub_enabled ? 1 : 0
source = "./modules/securityhub-baseline"

providers = {
aws = aws.ap-southeast-3
}

aggregate_findings = var.region == "ap-southeast-3"
enable_cis_standard = var.securityhub_enable_cis_standard
enable_pci_dss_standard = var.securityhub_enable_pci_dss_standard
enable_aws_foundational_standard = var.securityhub_enable_aws_foundational_standard
enable_product_arns = var.securityhub_enable_product_arns
master_account_id = local.securityhub_master_account_id
member_accounts = local.securityhub_member_accounts
}

module "securityhub_baseline_ca-central-1" {
count = contains(var.target_regions, "ca-central-1") && var.securityhub_enabled ? 1 : 0
source = "./modules/securityhub-baseline"
Expand Down
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ variable "target_regions" {
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ca-central-1",
"eu-central-1",
"eu-north-1",
Expand Down
19 changes: 19 additions & 0 deletions vpc_baselines.tf
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,25 @@ module "vpc_baseline_ap-southeast-2" {
tags = var.tags
}

module "vpc_baseline_ap-southeast-3" {
count = var.vpc_enable && contains(var.target_regions, "ap-southeast-3") ? 1 : 0
source = "./modules/vpc-baseline"

providers = {
aws = aws.ap-southeast-3
}

enable_flow_logs = var.vpc_enable_flow_logs
flow_logs_destination_type = var.vpc_flow_logs_destination_type
flow_logs_log_group_name = var.vpc_flow_logs_log_group_name
flow_logs_iam_role_arn = local.flow_logs_to_cw_logs ? aws_iam_role.flow_logs_publisher[0].arn : null
flow_logs_retention_in_days = var.vpc_flow_logs_retention_in_days
flow_logs_s3_arn = local.flow_logs_s3_arn
flow_logs_s3_key_prefix = var.vpc_flow_logs_s3_key_prefix

tags = var.tags
}

module "vpc_baseline_ca-central-1" {
count = var.vpc_enable && contains(var.target_regions, "ca-central-1") ? 1 : 0
source = "./modules/vpc-baseline"
Expand Down