resource "aws_security_group" "sg-04ef277e1d13f117c" {
  description = "AMP-AAS-D2-GSIRT-SG"
  egress = [
    {
      cidr_blocks = [
        "10.250.69.0/25",
        "10.250.6.0/24",
        "10.11.184.128/25",
      ]
      description      = "GSIRT TCP-8089"
      from_port        = 8089
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 8089
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
        "10.250.6.0/24",
        "10.11.184.128/25",
      ]
      description      = "GSIRT TCP-9998"
      from_port        = 9998
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9998
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.250.69.0/25",
        "10.250.6.0/24",
        "10.11.184.128/25",
      ]
      description      = "GSIRT TCP-8089"
      from_port        = 8089
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 8089
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
        "10.250.6.0/24",
        "10.11.184.128/25",
      ]
      description      = "GSIRT TCP-9998"
      from_port        = 9998
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9998
    },
  ]
  name = "AMP-AAS-D2-GSIRT-SG"
  tags = {
    "Business-Unit" = "Media Conversion"
    "Environment"   = "Dev"
    "Name"          = "AMP-AAS-D2-GSIRT-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "sg-0c592c30e20efc9c8" {
  description = "SG rule for amp-dev-as-eks worker node"
  egress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "DNS-TCP"
      from_port        = 53
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 53
    },
    {
      cidr_blocks = [
        "10.0.0.0/8",
      ]
      description      = "Kafka"
      from_port        = 9094
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9094
    },
    {
      cidr_blocks = [
        "10.0.0.0/8",
      ]
      description      = "Kafka"
      from_port        = 9098
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9098
    },
    {
      cidr_blocks = [
        "10.11.182.186/32",
      ]
      description      = "assetresolver-stage.smecloudops.com"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.11.182.157/32",
      ]
      description      = "assetresolver-stage.smecloudops.com"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.11.104.237/32",
      ]
      description      = "aoma-stage-pgbouncer.smecloudops.com"
      from_port        = 6432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 6432
    },
    {
      cidr_blocks = [
        "10.11.104.128/25",
      ]
      description      = "AMPS-Pods"
      from_port        = 9094
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9094
    },
    {
      cidr_blocks = [
        "10.11.180.32/28",
      ]
      description      = "Kafka-UAT"
      from_port        = 9098
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9098
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "DNS-UDP"
      from_port        = 53
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 53
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "FOR ASPERA"
      from_port        = 33001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 33001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "FOR ASPERA"
      from_port        = 33001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 33001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "FOR ASPERA"
      from_port        = 40001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 40001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "FOR ASPERA"
      from_port        = 40001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 40001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "FOR ASPERA"
      from_port        = 9092
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9092
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "FOR ASPERA"
      from_port        = 9092
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 9092
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "HTTP"
      from_port        = 80
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 80
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "HTTPS"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "NTP"
      from_port        = 123
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 123
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "SMTPS"
      from_port        = 587
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 587
    },
    {
      cidr_blocks = [
        "10.11.114.0/25",
      ]
      description      = "AMP-AAS-D2"
      from_port        = 9094
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9094
    },
    {
      cidr_blocks = [
        "10.11.114.84/32",
      ]
      description      = "aoma-dev-pgbouncer.smecloudops.com"
      from_port        = 6432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 6432
    },
    {
      cidr_blocks = [
        "10.11.177.128/26",
      ]
      description      = "GDS-D"
      from_port        = 9098
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9098
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "VPC-CIDR-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "VPC-CIDR-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.237.0/24",
      ]
      description      = "TowerVPCcidr3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.237.0/24",
      ]
      description      = "TowerVPCcidr3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "TowerVPCcidr2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "TowerVPCcidr2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "TowerVPCcidr1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "TowerVPCcidr1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.64/27",
      ]
      description      = "SharedVPC1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.64/27",
      ]
      description      = "SharedVPC1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.192/28",
        "10.11.114.96/28",
        "10.11.114.112/28",
        "10.11.104.224/28",
        "10.11.104.240/28",
      ]
      description      = "sme-AAS-D-RDS-1A"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "VPC-CIDR-3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "VPC-CIDR-3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
      ]
      description      = "VPC-CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
      ]
      description      = "VPC-CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "172.34.19.64/27",
      ]
      description      = "sme-AAS-S-RDS"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.11.180.0/27",
      ]
      description      = "Kafka-Dev"
      from_port        = 9098
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9098
    }
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.176.219/32",
      ]
      description      = "cloudopsff-bastion02"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "VPC-CIDR-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "VPC-CIDR-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.237.0/24",
      ]
      description      = "TowerVPCcidr3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.237.0/24",
      ]
      description      = "TowerVPCcidr3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "TowerVPCcidr2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "TowerVPCcidr2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "SharedVPC"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "SharedVPC"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.64/27",
      ]
      description      = "SharedVPC1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.64/27",
      ]
      description      = "SharedVPC1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "VPC-CIDR-3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "VPC-CIDR-3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
      ]
      description      = "VPC-CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
      ]
      description      = "VPC-CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks      = []
      description      = "Allow node to communicate with each other"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = true
      to_port          = 65535
    },
    {
      cidr_blocks      = []
      description      = "Allow node to communicate with each other"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = true
      to_port          = 65535
    },
    {
      cidr_blocks      = []
      description      = "Allow pods running extension API servers on port 443 to receive communication from cluster control plane"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-030fdc634ac3b42a1",
      ]
      self    = false
      to_port = 443
    },
    {
      cidr_blocks      = []
      description      = "Allow worker Kubelets and pods to receive communication from the cluster control plane"
      from_port        = 1025
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-030fdc634ac3b42a1",
      ]
      self    = false
      to_port = 65535
    },
    {
      cidr_blocks      = []
      description      = "elbv2.k8s.aws/targetGroupBinding=shared"
      from_port        = 18080
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-01283cf7d81c8673f",
      ]
      self    = false
      to_port = 18080
    },
    {
      cidr_blocks = [
        "10.250.5.192/28",
        "10.11.114.96/28",
        "10.11.114.112/28",
        "10.11.104.224/28",
        "10.11.104.240/28",
      ]
      description      = "sme-AAS-D-RDS-1A"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
  ]
  name     = "amp-dev-as-eks-Worker-node-SG"
  tags     = {
    "karpenter.sh/discovery" = "amp-dev-as-eks"
    "Environment"   = "Dev"
    "Name"          = "amp-dev-as-eks-Worker-node-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id   = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "sg-030fdc634ac3b42a1" {
  description = "Security Group for amp-dev-as-eks"
  egress = [
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "VPC-CIDR-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "VPC-CIDR-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "VPC-CIDR-3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "VPC-CIDR-3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
      ]
      description      = "VPC-CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
      ]
      description      = "VPC-CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.104.208/28",
        "10.11.104.192/28",
        "10.11.104.224/28",
      ]
      description      = "Kafka"
      from_port        = 9098
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9098
    },
    {
      cidr_blocks = [
        "10.11.104.208/28",
        "10.11.104.192/28",
        "10.11.104.224/28",
      ]
      description      = "Kafka"
      from_port        = 9098
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9098
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.114.32/27",
      ]
      description      = "AOMA-Gitrun"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.0.0.0/8",
      ]
      description      = "SME-VPN-1"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.12.246.0/24",
      ]
      description      = "API Server access from eks mngr"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "TowerVPC"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "TowerVPC"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks      = []
      description      = "Allow pods to communicate with the cluster API Server"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-0c592c30e20efc9c8",
      ]
      self    = false
      to_port = 443
    },
  ]
  name     = "amp-dev-as-eks-ControlPlane-SG"
  tags     = {
    "Environment"   = "Dev"
    "Name"          = "amp-dev-as-eks-ControlPlane-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id   = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "sg-0332481580582ebb2" {
  description = "[k8s] Managed SecurityGroup for LoadBalancer"
  egress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.0.0.0/8",
        "162.49.0.0/16",
        "192.168.10.0/23",
        "192.168.12.0/24",
        "192.168.155.0/24",
        "192.168.227.0/24",
      ]
      description      = ""
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
  ]
  name = "k8s-ampstage-ampservi-eb473ef1da"
  tags = {
    "elbv2.k8s.aws/cluster"    = "amp-dev-as-eks"
    "ingress.k8s.aws/resource" = "ManagedLBSecurityGroup"
    "ingress.k8s.aws/stack"    = "amp-stage-as/amp-service-gateway-ingress"
    "Name"                     = "amp-service-gateway-ingress-alb"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "sg-01283cf7d81c8673f" {
  description = "[k8s] Shared Backend SecurityGroup for LoadBalancer"
  egress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.0.0.0/8",
        "162.49.0.0/16",
      ]
      description      = ""
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "172.34.19.32/28"
      ]
      description      = "sme-AAS-S-APP-1A"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
  ]
  name = "k8s-traffic-ampdevaseks-07b8b93e06"
  tags = {
    "elbv2.k8s.aws/cluster"  = "amp-dev-as-eks"
    "elbv2.k8s.aws/resource" = "backend-sg"
    "Environment"            = "Dev"
    "Name"                   = "k8s-traffic-ampdevaseks-07b8b93e06"
    "CLOPS_FW"               = "NO"
    "Project-Name"           = "Asset_Service"
    "Project-Code"           = "AMP"
    "Owner"                  = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "sg-0095c7e52f723537b" {
  description = "[k8s] Managed SecurityGroup for LoadBalancer"
  egress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.0.0.0/8",
        "162.49.0.0/16",
        "192.168.10.0/23",
        "192.168.12.0/24",
        "192.168.155.0/24",
        "192.168.227.0/24",
      ]
      description      = ""
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
  ]
  name = "k8s-ampdevas-ampservi-c566fdaf98"
  tags = {
    "elbv2.k8s.aws/cluster"    = "amp-dev-as-eks"
    "ingress.k8s.aws/resource" = "ManagedLBSecurityGroup"
    "ingress.k8s.aws/stack"    = "amp-dev-as/amp-service-gateway-ingress"
    "Environment"              = "Dev"
    "Name"                     = "amp-service-gateway-ingress-alb"
    "CLOPS_FW"                 = "NO"
    "Project-Name"             = "Asset_Service"
    "Project-Code"             = "AMP"
    "Owner"                    = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "sg-046205bed3570fa2e" {
  description = "default VPC security group"
  egress      = []
  ingress     = []
  name        = "default"
  tags        = {
    "Environment"   = "Dev"
    "Name"          = "default"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id      = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "sg-0a67d70b898cdb653" {
  description = "EKS created security group applied to ENI that is attached to EKS Control Plane master nodes, as well as any managed workloads."
  egress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.104.208/28",
        "10.11.104.192/28",
        "10.11.104.224/28",
      ]
      description      = "Kafka"
      from_port        = 9098
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9098
    },
  ]
  ingress = [
    {
      cidr_blocks      = []
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = true
      to_port          = 65535
    },
    {
      cidr_blocks      = []
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = true
      to_port          = 65535
    },
    {
      cidr_blocks      = ["10.11.114.0/26" ]
      description      = "AOMA-D2-APP subnet"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks      = []
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "-1"
      security_groups  = []
      self             = true
      to_port          = 0
    },
  ]
  name = "eks-cluster-sg-amp-dev-as-eks-1923261651"
  tags = {
    "kubernetes.io/cluster/amp-dev-as-eks" = "owned"
    "Environment"                          = "Dev"
    "Name"                                 = "eks-cluster-sg-amp-dev-as-eks-1923261651"
    "CLOPS_FW"                             = "NO"
    "Project-Name"                         = "Asset_Service"
    "Project-Code"                         = "AMP"
    "Owner"                                = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "AMP-AAS-D2-ASPERA1-SG" {
  description = "AMP-AAS-D2-ASPERA1-SG"
  egress = [
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "CLOUDOPS-10531"
      from_port        = 33001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 33001
    },
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "apod.cimediacloud.com-CLOUDOPS-10531"
      from_port        = 33001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 33001
    },
    {
      cidr_blocks = ["0.0.0.0/0"]
      description      = "NTP-UDP"
      from_port        = 123
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 123
    },
    {
      cidr_blocks = ["0.0.0.0/0"]
      description      = "NTP-UDP"
      from_port        = 323
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 323
    },
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "apod.cimediacloud.com-CLOUDOPS-10531"
      from_port        = 9092
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9092
    },
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "apod.cimediacloud.com-CLOUDOPS-10531"
      from_port        = 9092
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9092
    },
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "HTTP"
      from_port        = 80
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 80
    },
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "HTTPS"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks      = ["10.12.246.64/26", "10.12.237.160/27"]
      description      = "CLOPS-SMTP-EP"
      from_port        = 587
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 587
    },
    {
      cidr_blocks      = ["10.11.184.128/25", "10.250.69.0/25", "10.250.6.0/24"]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks      = ["10.11.184.128/25", "10.250.69.0/25", "10.250.6.0/24"]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 33001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 33001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 33001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 33001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 40001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 40001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 40001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 40001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 43003
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 43003
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 43004
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 43004
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 9092
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9092
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 9092
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 9092
    },
    {
      cidr_blocks = [
        "10.11.176.219/32",
      ]
      description      = "cloudopsff-bastion02"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
    {
      cidr_blocks = [
        "10.11.186.192/28",
      ]
      description      = "ampaasp2-aspconsole01"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
    {
      cidr_blocks = [
        "10.12.246.75/32",
      ]
      description      = "clshrd-bastion01"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
    {
      cidr_blocks = [
        "10.250.2.64/27",
      ]
      description      = "Ansible_Tower"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
  ]
  name = "AMP-AAS-D2-ASPERA1-SG"
  tags = {
    "Business-Unit" = "SME-AMP"
    "Patch Group"   = "General"
    "Environment"   = "Dev"
    "Name"          = "AMP-AAS-D2-ASPERA1-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"
}


resource "aws_security_group" "AMP-AAS-D2-DEV-DB-SG" {
  description = "AMP-AAS-D2-DEV-DB-SG"
  egress = [
    {
      cidr_blocks = [
        "10.11.176.192/27",
      ]
      description      = "To CCSHARE-FF-APP-1A"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.192/27",
      ]
      description      = "To CCSHARE-FF-APP-1A"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "AMP-D2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "AMP-D2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P CIDR-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P CIDR-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "From CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "From CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "AMP-D2"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.12.197.215/32",
      ]
      description      = "ampd-bastion01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.12.198.128/25",
      ]
      description      = ""
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.69.64/27"
      ]
      description      = "AMP-AAS-D2-XRDS"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.12.246.64/27",
      ]
      description      = "SSH from clshrd-bastion01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.2.30/32",
      ]
      description      = "clshrd-bastion03"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.2.64/27",
      ]
      description      = "SSH from clshrd-tower01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
      ]
      description      = "VPC"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "EKS-Pods"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
  ]
  name = "AMP-AAS-D2-DEV-DB-SG"
  tags = {
    "Business-Unit" = "SME-AMP"
    "Environment"   = "Dev"
    "Name"          = "AMP-AAS-D2-DEV-DB-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = aws_vpc.vpc-0288bd1df33f9a19e.id
}

resource "aws_security_group" "AMPD2-AAS-RDS-DEV-SG" {
  description = "SG rules for DEV RDS"
  egress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "To CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "To CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
	"10.11.184.128/25",
	"10.250.69.0/25",
	"10.250.6.0/24",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
	"10.11.184.128/25",
	"10.250.69.0/25",
	"10.250.6.0/24",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.236.190/32",
      ]
      description      = "From awxd-dbutils01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks      = []
      description      = "Allowing RDS Proxy to DB"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-0b123c5e64ae15dcd",
      ]
      self    = false
      to_port = 5432
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "SSH from clshrd-bastion01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "CLSHRD-P"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
		    "10.11.184.128/25",
		    "10.250.69.0/25",
		    "10.250.6.0/24",
      ]
      description      = "VPC"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
  ]
  name = "AMPD2-AAS-RDS-DEV-SG"
  tags = {
    "Business-Unit" = "SME-AMP"
    "Environment"   = "Dev"
    "Name"          = "AMPD2-AAS-RDS-DEV-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "AMPD2-AAS-RDSPROXY-DEV-SG" {
  description = "SG rules for DEV RDS PROXY"
  egress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "To CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "To CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
	"10.11.184.128/25",
	"10.250.69.0/25",
	"10.250.6.0/24",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
	"10.11.184.128/25",
	"10.250.69.0/25",
	"10.250.6.0/24",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.236.190/32",
      ]
      description      = "From awxd-dbutils01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.0.0.0/8",
      ]
      description      = "SME-VPN-1"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.11.114.0/25",
        "10.11.114.128/26",
      ]
      description      = "From Ameba-Dev"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "SSH from clshrd-bastion01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "CLSHRD-P"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks      = []
      description      = "From media-extractor-lambda SG"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-0c592c30e20efc9c8",
      ]
      self    = false
      to_port = 5432
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
		    "10.11.184.128/25",
		    "10.250.69.0/25",
		    "10.250.6.0/24",
      ]
      description      = "VPC"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
  ]
  name = "AMPD2-AAS-RDSPROXY-DEV-SG"
  tags = {
    "Business-Unit" = "SME-AMP"
    "Environment"   = "Dev"
    "Name"          = "AMPD2-AAS-RDSPROXY-DEV-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "amp-aas-d2-batch-sg" {
  description = "AMP-AAS-D2-BATCH-SG"
  egress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "Aspera"
      from_port        = 33001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 33001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "Aspera"
      from_port        = 33001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 33001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "Aspera"
      from_port        = 40001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 40001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "Aspera"
      from_port        = 40001
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 40001
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "Aspera"
      from_port        = 9092
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9092
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "Aspera"
      from_port        = 9092
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 9092
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "HTTP"
      from_port        = 80
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 80
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "HTTPS"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "Kafka"
      from_port        = 9094
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9094
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
        "10.250.69.0/25",
        "10.250.6.0/24",
        "10.250.5.128/25",
        "10.11.108.64/26",
        "10.250.32.128/26",
        "172.34.19.0/24",
        "172.34.19.128/25",
        "172.34.12.0/24",
        "172.34.15.0/24",
      ]
      description      = "RDS"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
        "10.250.69.0/25",
        "10.250.6.0/24",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
        "10.250.69.0/25",
        "10.250.6.0/24",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.184.128/25",
        "10.250.69.0/25",
        "10.250.6.0/24",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
        "10.250.69.0/25",
        "10.250.6.0/24",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  name = "AMP-AAS-D2-BATCH-SG"
  tags = {
    "Business-Unit" = "SME-AMP"
    "Environment"   = "Dev"
    "Name"          = "AMP-AAS-D2-BATCH-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"
}

resource "aws_security_group" "AMPD2-AAS-RDS-STAGE-SG" {
  description = "SG rules for STAGE RDS"
  egress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "To CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "To CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
	"10.11.184.128/25",
	"10.250.69.0/25",
	"10.250.6.0/24",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
	"10.11.184.128/25",
	"10.250.69.0/25",
	"10.250.6.0/24",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.236.190/32",
      ]
      description      = "From awxd-dbutils01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks      = []
      description      = "Allowing RDS Proxy to DB"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-02a434640267a7ac0",
      ]
      self    = false
      to_port = 5432
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "SSH from clshrd-bastion01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "CLSHRD-P"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
		"10.11.184.128/25",
		"10.250.69.0/25",
		"10.250.6.0/24",
      ]
      description      = "VPC"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
  ]
  name = "AMPD2-AAS-RDS-STAGE-SG"
  tags = {
    "Business-Unit" = "SME-AMP"
    "Environment"   = "Stage"
    "Name"          = "AMPD2-AAS-RDS-STAGE-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "AMPD2-AAS-RDSPROXY-STAGE-SG" {
  description = "SG rules for DEV RDS PROXY"
  egress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "To CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "To CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "To CLSHRD-P"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
	"10.11.184.128/25",
	"10.250.69.0/25",
	"10.250.6.0/24",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
	"10.11.184.128/25",
	"10.250.69.0/25",
	"10.250.6.0/24",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.0.0.0/8",
      ]
      description      = "SME-VPN-1"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.11.176.0/24",
      ]
      description      = "CCSHARE-FF"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.12.236.190/32",
      ]
      description      = "From awxd-dbutils01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.11.114.0/25",
        "10.11.114.128/26",
      ]
      description      = "From Ameba-Dev"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.12.246.0/25",
      ]
      description      = "SSH from clshrd-bastion01"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "CLSHRD-P"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
		    "10.11.184.128/25",
		    "10.250.69.0/25",
		    "10.250.6.0/24",
      ]
      description      = "VPC"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 5432
    },
  ]
  name = " AMPD2-AAS-RDSPROXY-STAGE-SG"
  tags = {
    "Business-Unit" = "SME-AMP"
    "Environment"   = "Stage"
    "Name"          = "AMPD2-AAS-RDSPROXY-STAGE-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "sme-amp-asset-srv-d-ES-SG" {
  description = "sme-amp-asset-srv-d-ES-SG"
  egress = [
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR-3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.69.0/25",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR-3"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = [
        "10.250.6.0/24",
      ]
      description      = "AMP-AAS-D2-VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.0.0.0/8",
      ]
      description      = "SME-EU"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.11.176.219/32",
      ]
      description      = "cloudopsff-bastion02"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.12.0.0/16",
      ]
      description      = "SME-US"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.250.5.128/25",
        "10.11.108.64/27",
        "10.11.108.96/28",
      ]
      description      = "sme-amp-asset-srv-d-VPC-CIDR"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "162.49.0.0/16",
      ]
      description      = "SME-VPN-1"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "172.34.19.0/25",
      ]
      description      = "sme-amp-asset-srv-s"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "192.168.10.0/23",
      ]
      description      = "SME-VPN-2"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "192.168.12.0/24",
      ]
      description      = "SME-VPN-3"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "192.168.155.0/24",
      ]
      description      = "SME-VPN-4"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "192.168.227.0/24",
      ]
      description      = "SME-VPN-5"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
  ]
  name     = "sme-amp-asset-srv-d-ES-SG"
  tags     = {
    "Environment"   = "Dev"
    "Name"          = "sme-amp-asset-srv-d-ES-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id   = "vpc-0288bd1df33f9a19e"

}

resource "aws_security_group" "AMP-AAS-D2-INT-ALB-SG" {
  description = "Security Group for Internal ALBs"
  egress = [
    {
      cidr_blocks = [
        "10.11.184.128/25",
		    "10.250.69.0/25",
		    "10.250.6.0/24",
		    "10.0.0.0/8",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.0.0.0/8",
		    "162.49.0.0/16",
		    "192.168.0.0/16",
      ]
      description      = "VPN CIDRs"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
		    "10.250.69.0/25",
		    "10.250.6.0/24",
      ]
      description      = "VPC-CIDRs"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  name     = "AMP-AAS-D2-INT-ALB-SG"
  tags     = {
    "Environment"   = "Dev"
    "Name"          = "AMP-AAS-D2-INT-ALB-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id   = "vpc-0288bd1df33f9a19e"
}

resource "aws_security_group" "AMP-AAS-D2-TUSD-SG" {
  description = "AMP-AAS-D2-TUSD-SG"
  egress = [
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "From the World"
      from_port        = 8080
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 8080
    },
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "From the World"
      from_port        = 8080
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 8080
    },
    {
      cidr_blocks = ["0.0.0.0/0"]
      description      = "NTP-UDP"
      from_port        = 123
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 123
    },
    {
      cidr_blocks = ["0.0.0.0/0"]
      description      = "NTP-UDP"
      from_port        = 323
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 323
    },
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "HTTP"
      from_port        = 80
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 80
    },
    {
      cidr_blocks      = ["0.0.0.0/0", ]
      description      = "HTTPS"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks      = ["10.12.246.64/26", "10.12.237.160/27"]
      description      = "CLOPS-SMTP-EP"
      from_port        = 587
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 587
    },
    {
      cidr_blocks      = ["10.11.184.128/25", "10.250.69.0/25", "10.250.6.0/24"]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks      = ["10.0.0.0/8"]
      description      = "VPN-1"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks      = ["10.11.184.128/25", "10.250.69.0/25", "10.250.6.0/24"]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 8080
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 8080
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "HTTPS-TUSD"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "From the World"
      from_port        = 8080
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 8080
    },
    {
      cidr_blocks      = ["10.11.184.128/25", "10.250.69.0/25", "10.250.6.0/24"]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
    {
      cidr_blocks = ["10.11.176.219/32", "10.12.246.64/27", "10.250.2.64/27"]
      description      = "CloudOPS Bastions"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
  ]
  name = "AMP-AAS-D2-TUSD-SG"
  tags = {
    "Environment"   = "Dev"
    "Name"          = "AMP-AAS-D2-TUSD-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"
}

resource "aws_security_group" "AMP-AAS-D2-SMEJ-ALB-SG" {
  description = "Security Group for SMEJ Ext ALB"
  egress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "HTTP"
      from_port        = 80
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 80
    },
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = "HTTPS"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
		    "10.250.69.0/25",
		    "10.250.6.0/24",
		    "10.0.0.0/8",
      ]
      description      = "VPC-CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "202.32.161.13/32",
        "202.32.161.130/32",
        "24.90.27.53/32",
        "35.75.100.206/32",
        "13.114.144.63/32",
        "3.114.23.77/32",
        "18.176.64.118/32",
        "4.15.150.137/32"
      ]
      description      = "SMEJ-CLOUDOPS-20350"
      from_port        = 443
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 443
    },
    {
      cidr_blocks = [
        "10.11.184.128/25",
		"10.250.69.0/25",
		"10.250.6.0/24",
      ]
      description      = "VPC-CIDRs"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65535
    },
  ]
  name = "AMP-AAS-D2-SMEJ-ALB-SG"
  tags = {
    "Business-Unit" = "SME-AMP"
    "Patch Group"   = "General"
    "Environment"   = "Dev"
    "Name"          = "AMP-AAS-D2-SMEJ-ALB-SG"
    "CLOPS_FW"      = "NO"
    "Project-Name"  = "Asset_Service"
    "Project-Code"  = "AMP"
    "Owner"         = "Nathaniel Lovett"
  }
  vpc_id = "vpc-0288bd1df33f9a19e"
}
