-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove eventdriven rule creation & sort tf files (#74)
distribute main.tf into multi tf remove eventdriven rule creation module update fireflyEventDrivenRulesPermission policy to specific actions
- Loading branch information
1 parent
4ad2335
commit 427796d
Showing
18 changed files
with
894 additions
and
1,463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module "firefly_auth" { | ||
count = var.firefly_token == "" ? 1 : 0 | ||
source = "./modules/firefly_auth" | ||
firefly_endpoint = var.firefly_endpoint | ||
firefly_access_key = var.firefly_access_key | ||
firefly_secret_key = var.firefly_secret_key | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,242 @@ | ||
module "iac_events_ap_northeast_1" { | ||
count = lookup(var.buckets_by_region, "ap-northeast-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ap-northeast-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ap-northeast-1") | ||
region = "ap-northeast-1" | ||
providers = { | ||
aws = aws.ap_northeast_1 | ||
} | ||
} | ||
|
||
module "iac_events_ap_northeast_2" { | ||
count = lookup(var.buckets_by_region, "ap-northeast-2", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ap-northeast-2", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ap-northeast-2") | ||
region = "ap-northeast-2" | ||
providers = { | ||
aws = aws.ap_northeast_2 | ||
} | ||
} | ||
|
||
|
||
module "iac_events_ap_northeast_3" { | ||
count = lookup(var.buckets_by_region, "ap-northeast-3", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ap-northeast-3", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ap-northeast-3") | ||
region = "ap-northeast-3" | ||
providers = { | ||
aws = aws.ap_northeast_3 | ||
} | ||
} | ||
|
||
module "iac_events_ap_south_1" { | ||
count = lookup(var.buckets_by_region, "ap-south-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ap-south-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ap-south-1") | ||
region = "ap-south-1" | ||
providers = { | ||
aws = aws.ap_south_1 | ||
} | ||
} | ||
|
||
module "iac_events_ap_southeast_1" { | ||
count = lookup(var.buckets_by_region, "ap-southeast-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ap-southeast-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ap-southeast-1") | ||
region = "ap-southeast-1" | ||
providers = { | ||
aws = aws.ap_southeast_1 | ||
} | ||
} | ||
|
||
module "iac_events_ap_southeast_2" { | ||
count = lookup(var.buckets_by_region, "ap-southeast-2", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ap-southeast-2", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ap-southeast-2") | ||
region = "ap-southeast-2" | ||
providers = { | ||
aws = aws.ap_southeast_2 | ||
} | ||
} | ||
|
||
module "iac_events_ca_central_1" { | ||
count = lookup(var.buckets_by_region, "ca-central-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ca-central-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ca-central-1") | ||
region = "ca-central-1" | ||
providers = { | ||
aws = aws.ca_central_1 | ||
} | ||
} | ||
|
||
module "iac_events_eu_central_1" { | ||
count = lookup(var.buckets_by_region, "eu-central-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "eu-central-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "eu-central-1") | ||
region = "eu-central-1" | ||
providers = { | ||
aws = aws.eu_central_1 | ||
} | ||
} | ||
|
||
module "iac_events_eu_north_1" { | ||
count = lookup(var.buckets_by_region, "eu-north-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "eu-north-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "eu-north-1") | ||
region = "eu-north-1" | ||
providers = { | ||
aws = aws.eu_north_1 | ||
} | ||
} | ||
|
||
module "iac_events_eu_west_1" { | ||
count = lookup(var.buckets_by_region, "eu-west-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "eu-west-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "eu-west-1") | ||
region = "eu-west-1" | ||
providers = { | ||
aws = aws.eu_west_1 | ||
} | ||
} | ||
|
||
module "iac_events_eu_west_2" { | ||
count = lookup(var.buckets_by_region, "eu-west-2", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "eu-west-2", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "eu-west-2") | ||
region = "eu-west-2" | ||
providers = { | ||
aws = aws.eu_west_2 | ||
} | ||
} | ||
|
||
module "iac_events_eu_west_3" { | ||
count = lookup(var.buckets_by_region, "eu-west-3", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "eu-west-3", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "eu-west-3") | ||
region = "eu-west-3" | ||
providers = { | ||
aws = aws.eu_west_3 | ||
} | ||
} | ||
|
||
module "iac_events_sa_east_1" { | ||
count = lookup(var.buckets_by_region, "sa-east-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "sa-east-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "sa-east-1") | ||
region = "sa-east-1" | ||
providers = { | ||
aws = aws.sa_east_1 | ||
} | ||
} | ||
|
||
module "iac_events_us_east_1" { | ||
count = lookup(var.buckets_by_region, "us-east-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "us-east-1", []) | ||
sns_arn = var.iac_events_sns | ||
region = "us-east-1" | ||
providers = { | ||
aws = aws.us_east_1 | ||
} | ||
} | ||
|
||
module "iac_events_us_east_2" { | ||
count = lookup(var.buckets_by_region, "us-east-2", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "us-east-2", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "us-east-2") | ||
region = "us-east-2" | ||
providers = { | ||
aws = aws.us_east_2 | ||
} | ||
} | ||
|
||
module "iac_events_us_west_1" { | ||
count = lookup(var.buckets_by_region, "us-west-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "us-west-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "us-west-1") | ||
region = "us-west-1" | ||
providers = { | ||
aws = aws.us_west_1 | ||
} | ||
} | ||
|
||
module "iac_events_us_west_2" { | ||
count = lookup(var.buckets_by_region, "us-west-2", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "us-west-2", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "us-west-2") | ||
region = "us-west-2" | ||
providers = { | ||
aws = aws.us_west_2 | ||
} | ||
} | ||
|
||
module "iac_events_ap_south_2" { | ||
count = lookup(var.buckets_by_region, "ap-south-2", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ap-south-2", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ap-south-2") | ||
region = "ap-south-2" | ||
providers = { | ||
aws = aws.ap_south_2 | ||
} | ||
} | ||
|
||
module "iac_events_ap_southeast_3" { | ||
count = lookup(var.buckets_by_region, "ap-southeast-3", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "ap-southeast-3", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "ap-southeast-3") | ||
region = "ap-southeast-3" | ||
providers = { | ||
aws = aws.ap_southeast_3 | ||
} | ||
} | ||
|
||
module "iac_events_eu_south_2" { | ||
count = lookup(var.buckets_by_region, "eu-south-2", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "eu-south-2", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "eu-south-2") | ||
region = "eu-south-2" | ||
providers = { | ||
aws = aws.eu_south_2 | ||
} | ||
} | ||
|
||
module "iac_events_me_central_1" { | ||
count = lookup(var.buckets_by_region, "me-central-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "me-central-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "me-central-1") | ||
region = "me-central-1" | ||
providers = { | ||
aws = aws.me_central_1 | ||
} | ||
} | ||
|
||
module "iac_events_il_central_1" { | ||
count = lookup(var.buckets_by_region, "il-central-1", []) != [] ? 1 : 0 | ||
source = "./modules/s3_iac_events" | ||
bucket_names = lookup(var.buckets_by_region, "il-central-1", []) | ||
sns_arn = replace(var.iac_events_sns, "us-east-1", "il-central-1") | ||
region = "il-central-1" | ||
providers = { | ||
aws = aws.il_central_1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
locals { | ||
firefly_role_name = "${var.resource_prefix}${var.firefly_role_name}" | ||
firefly_deny_list_policy_name = "${var.resource_prefix}${var.firefly_deny_list_policy_name}" | ||
} |
Oops, something went wrong.