-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
364 additions
and
419 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
terraform { | ||
backend "s3" { | ||
encrypt = true | ||
bucket = "cisa-cool-terraform-state" | ||
dynamodb_table = "terraform-state-lock" | ||
encrypt = true | ||
key = "cool-accounts/audit.tfstate" | ||
profile = "cool-terraform-backend" | ||
region = "us-east-1" | ||
key = "cool-accounts/audit.tfstate" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
output "cw_alarm_sns_topic" { | ||
value = module.cw_alarm_sns.sns_topic | ||
description = "The SNS topic to which a message is sent when a CloudWatch alarm is triggered." | ||
value = module.cw_alarm_sns.sns_topic | ||
} | ||
|
||
output "provisionaccount_role" { | ||
value = module.provisionaccount.provisionaccount_role | ||
description = "The IAM role that allows sufficient permissions to provision all AWS resources in the Audit account." | ||
value = module.provisionaccount.provisionaccount_role | ||
} |
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
terraform { | ||
backend "s3" { | ||
encrypt = true | ||
bucket = "cisa-cool-terraform-state" | ||
dynamodb_table = "terraform-state-lock" | ||
encrypt = true | ||
key = "cool-accounts/dns.tfstate" | ||
profile = "cool-terraform-backend" | ||
region = "us-east-1" | ||
key = "cool-accounts/dns.tfstate" | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
terraform { | ||
backend "s3" { | ||
encrypt = true | ||
bucket = "cisa-cool-terraform-state" | ||
dynamodb_table = "terraform-state-lock" | ||
encrypt = true | ||
key = "cool-accounts/dynamic.tfstate" | ||
profile = "cool-terraform-backend" | ||
region = "us-east-1" | ||
key = "cool-accounts/dynamic.tfstate" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
output "cw_alarm_sns_topic" { | ||
value = module.cw_alarm_sns.sns_topic | ||
description = "The SNS topic to which a message is sent when a CloudWatch alarm is triggered." | ||
value = module.cw_alarm_sns.sns_topic | ||
} | ||
|
||
output "ec2readonly_role" { | ||
value = aws_iam_role.ec2readonly_role | ||
description = "The IAM role that allows read access to some EC2 attributes in the dynamic account." | ||
value = aws_iam_role.ec2readonly_role | ||
} | ||
|
||
output "provisionaccount_role" { | ||
value = module.provisionaccount.provisionaccount_role | ||
description = "The IAM role that allows sufficient permissions to provision all AWS resources in the dynamic account." | ||
value = module.provisionaccount.provisionaccount_role | ||
} |
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
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 |
---|---|---|
@@ -1,37 +1,37 @@ | ||
# Allow ingress from anywhere via ssh | ||
resource "aws_network_acl_rule" "ami_build_public_ingress_from_anywhere_via_ssh" { | ||
network_acl_id = aws_network_acl.ami_build_public.id | ||
cidr_block = "0.0.0.0/0" | ||
egress = false | ||
from_port = 22 | ||
network_acl_id = aws_network_acl.ami_build_public.id | ||
protocol = "tcp" | ||
rule_number = "100" | ||
rule_action = "allow" | ||
cidr_block = "0.0.0.0/0" | ||
from_port = 22 | ||
rule_number = "100" | ||
to_port = 22 | ||
} | ||
|
||
# Allow ingress from anywhere via ephemeral ports | ||
resource "aws_network_acl_rule" "ami_build_public_ingress_from_anywhere_via_ephemeral_ports" { | ||
count = length(local.tcp_and_udp) | ||
|
||
network_acl_id = aws_network_acl.ami_build_public.id | ||
cidr_block = "0.0.0.0/0" | ||
egress = false | ||
from_port = 1024 | ||
network_acl_id = aws_network_acl.ami_build_public.id | ||
protocol = local.tcp_and_udp[count.index] | ||
rule_number = 120 + count.index | ||
rule_action = "allow" | ||
cidr_block = "0.0.0.0/0" | ||
from_port = 1024 | ||
rule_number = 120 + count.index | ||
to_port = 65535 | ||
} | ||
|
||
# Allow egress to anywhere via any protocol and port | ||
resource "aws_network_acl_rule" "ami_build_public_egress_to_anywhere_via_any_port" { | ||
network_acl_id = aws_network_acl.ami_build_public.id | ||
cidr_block = "0.0.0.0/0" | ||
egress = true | ||
from_port = 0 | ||
network_acl_id = aws_network_acl.ami_build_public.id | ||
protocol = "-1" | ||
rule_number = 140 | ||
rule_action = "allow" | ||
cidr_block = "0.0.0.0/0" | ||
from_port = 0 | ||
rule_number = 140 | ||
to_port = 0 | ||
} |
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
Oops, something went wrong.