|
@@ -168,14 +168,14 @@ data "template_cloudinit_config" "cloud-init" {
|
|
|
|
|
|
|
|
|
#------------------------------------
|
|
|
-# S3 Bucket What is this used for?
|
|
|
+# S3 Bucket What is this used for? Uncomment if needed.
|
|
|
#------------------------------------
|
|
|
-resource "aws_s3_bucket" "customer-portal" {
|
|
|
- bucket = "dps-customer-portal-${terraform.workspace}"
|
|
|
- acl = "private"
|
|
|
+# resource "aws_s3_bucket" "customer-portal" {
|
|
|
+# bucket = "dps-customer-portal-${terraform.workspace}"
|
|
|
+# acl = "private"
|
|
|
|
|
|
- tags = merge(var.standard_tags, var.tags, )
|
|
|
-}
|
|
|
+# tags = merge(var.standard_tags, var.tags, )
|
|
|
+# }
|
|
|
|
|
|
#------------------------------------
|
|
|
# Security Groups
|
|
@@ -196,149 +196,33 @@ resource "aws_security_group_rule" "customer_portal" {
|
|
|
source_security_group_id = aws_security_group.customer_portal_alb.id
|
|
|
}
|
|
|
|
|
|
-resource "aws_security_group" "customer_portal_ecr" {
|
|
|
- name = "ecr_customer_portal"
|
|
|
- description = "Allow HTTPS outbound from portal to ECR"
|
|
|
- vpc_id = var.vpc_id
|
|
|
-}
|
|
|
-
|
|
|
-resource "aws_security_group_rule" "customer_portal_ecr_inbound" {
|
|
|
- security_group_id = aws_security_group.customer_portal_ecr.id
|
|
|
-
|
|
|
- type = "ingress"
|
|
|
- from_port = 443
|
|
|
- to_port = 443
|
|
|
- protocol = "tcp"
|
|
|
- source_security_group_id = aws_security_group.customer_portal.id
|
|
|
-}
|
|
|
-
|
|
|
resource "aws_security_group_rule" "customer_portal_postgres_outbound" {
|
|
|
- security_group_id = aws_security_group.customer_portal.id
|
|
|
-
|
|
|
type = "egress"
|
|
|
from_port = 5432
|
|
|
to_port = 5432
|
|
|
protocol = "tcp"
|
|
|
+ security_group_id = aws_security_group.customer_portal.id
|
|
|
source_security_group_id = aws_security_group.postgres.id
|
|
|
}
|
|
|
|
|
|
-#resource "aws_security_group_rule" "customer_portal_salt_outbound" {
|
|
|
-# security_group_id = aws_security_group.customer_portal.id
|
|
|
-#
|
|
|
-# type = "egress"
|
|
|
-# from_port = 4505
|
|
|
-# to_port = 4506
|
|
|
-# protocol = "tcp"
|
|
|
-# cidr_blocks = var.salt_master_ip
|
|
|
-#}
|
|
|
-
|
|
|
-#resource "aws_security_group_rule" "customer_portal_gc_salt_outbound" {
|
|
|
-# security_group_id = aws_security_group.customer_portal.id
|
|
|
-#
|
|
|
-# type = "egress"
|
|
|
-# from_port = 4505
|
|
|
-# to_port = 4506
|
|
|
-# protocol = "tcp"
|
|
|
-# cidr_blocks = var.salt_master_ip
|
|
|
-#}
|
|
|
-
|
|
|
-#resource "aws_security_group_rule" "customer_portal_sensu_outbound" {
|
|
|
-# security_group_id = aws_security_group.customer_portal.id
|
|
|
-#
|
|
|
-# type = "egress"
|
|
|
-# from_port = 8081
|
|
|
-# to_port = 8081
|
|
|
-# protocol = "tcp"
|
|
|
-# source_security_group_id = "${data.terraform_remote_state.infra.sensu_servers_sg}"
|
|
|
-#}
|
|
|
-
|
|
|
resource "aws_security_group_rule" "customer_portal_http_outbound" {
|
|
|
- security_group_id = aws_security_group.customer_portal.id
|
|
|
-
|
|
|
type = "egress"
|
|
|
from_port = 80
|
|
|
to_port = 80
|
|
|
protocol = "tcp"
|
|
|
cidr_blocks = ["0.0.0.0/0"]
|
|
|
+ security_group_id = aws_security_group.customer_portal.id
|
|
|
}
|
|
|
|
|
|
resource "aws_security_group_rule" "customer_portal_https_outbound" {
|
|
|
- security_group_id = aws_security_group.customer_portal.id
|
|
|
-
|
|
|
type = "egress"
|
|
|
from_port = 443
|
|
|
to_port = 443
|
|
|
protocol = "tcp"
|
|
|
cidr_blocks = ["0.0.0.0/0"]
|
|
|
+ security_group_id = aws_security_group.customer_portal.id
|
|
|
}
|
|
|
|
|
|
-# resource "aws_security_group_rule" "customer_portal_hec_outbound" {
|
|
|
-# security_group_id = aws_security_group.customer_portal.id
|
|
|
-
|
|
|
-# type = "egress"
|
|
|
-# from_port = 8088
|
|
|
-# to_port = 8088
|
|
|
-# protocol = "tcp"
|
|
|
-# cidr_blocks = ["${lookup(local.workspace-default-moose-idx-cidrs,terraform.workspace,"")}"]
|
|
|
-
|
|
|
-# description = "Outbound to Splunk Http Event Collector"
|
|
|
-# }
|
|
|
-
|
|
|
-# resource "aws_security_group_rule" "customer_portal_idxc_outbound" {
|
|
|
-# security_group_id = aws_security_group.customer_portal.id
|
|
|
-
|
|
|
-# type = "egress"
|
|
|
-# from_port = 8089
|
|
|
-# to_port = 8089
|
|
|
-# protocol = "tcp"
|
|
|
-# cidr_blocks = ["10.0.0.0/8"]
|
|
|
-# description = "Outbound IDXC Discovery to MOOSE"
|
|
|
-# }
|
|
|
-
|
|
|
-#resource "aws_security_group_rule" "customer_portal_ssh_inbound" {
|
|
|
-# security_group_id = "${aws_security_group.customer_portal.id}"
|
|
|
-#
|
|
|
-# type = "ingress"
|
|
|
-# from_port = 22
|
|
|
-# to_port = 22
|
|
|
-# protocol = "tcp"
|
|
|
-# cidr_blocks = "${ local.access-server-cidrs[terraform.workspace] }"
|
|
|
-#}
|
|
|
-
|
|
|
-#resource "aws_security_group_rule" "customer_portal_ssh_inbound_openvpn" {
|
|
|
-# security_group_id = "${aws_security_group.customer_portal.id}"
|
|
|
-#
|
|
|
-# type = "ingress"
|
|
|
-# from_port = 22
|
|
|
-# to_port = 22
|
|
|
-# protocol = "tcp"
|
|
|
-# source_security_group_id = "${data.terraform_remote_state.infra.openvpn_servers_sg}"
|
|
|
-#}
|
|
|
-
|
|
|
-#resource "aws_security_group_rule" "customer_portal_outbound_tcp_dns"
|
|
|
-#{
|
|
|
-# type = "egress"
|
|
|
-# from_port = 53
|
|
|
-# to_port = 53
|
|
|
-# protocol = "tcp"
|
|
|
-# cidr_blocks = "${local.dns-server-cidrs[terraform.workspace]}"
|
|
|
-# security_group_id = "${aws_security_group.customer_portal.id}"
|
|
|
-# description = "Connect to unbound servers for dns"
|
|
|
-#}
|
|
|
-
|
|
|
-#resource "aws_security_group_rule" "customer_portal_outbound_udp_dns"
|
|
|
-#{
|
|
|
-# type = "egress"
|
|
|
-# from_port = 53
|
|
|
-# to_port = 53
|
|
|
-# protocol = "udp"
|
|
|
-# cidr_blocks = "${local.dns-server-cidrs[terraform.workspace]}"
|
|
|
-# security_group_id = "${aws_security_group.customer_portal.id}"
|
|
|
-# description = "Connect to unbound servers for dns"
|
|
|
-#}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
### Output environment ID for purposes
|
|
|
#output portal_env_id {
|
|
|
# value = "${aws_elastic_beanstalk_environment.mdr-customer-portal-env.id}"
|