resource "aws_security_group" "sg-0cd3c292434d12478" {
  description = "default VPC security group"
  egress      = []
  ingress     = []
  name        = "default"
  tags = {
    "Business-Unit" = "Digital-Exchange"
    "Environment"   = "Prod"
    "Owner"         = "Christian seitz"
    "Project-Code"  = "2000306K"
    "Project-Name"  = "SME-DX3-Prod"
    "CLOPS_FW"      = "NO"
    "Name"          = "DX3-P1-DEFAULT-SG"
  }
  tags_all = {
    "Business-Unit" = "Digital-Exchange"
    "Environment"   = "Prod"
    "Owner"         = "Christian seitz"
    "Project-Code"  = "2000306K"
    "Project-Name"  = "SME-DX3-Prod"
    "CLOPS_FW"      = "NO"
    "Name"          = "DX3-P1-DEFAULT-SG"
  }
  vpc_id = "vpc-0c22aaf78d3f32b63"

}

resource "aws_security_group" "sg-0138dfcdf7ae0a6cf" {
  description = "DX3-P1-GRASLITEPGBOUNCER-SG"
  egress = [
    {
      cidr_blocks = [
        "0.0.0.0/0",
      ]
      description      = ""
      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_port        = 80
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 80
    },
    {
      cidr_blocks = [
        "10.11.116.64/26", "10.250.243.128/25"
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.11.116.64/26", "10.250.243.128/25"
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      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          = 65534
    },
    {
      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          = 65534
    },
    {
      cidr_blocks = [
        "10.11.36.13/32",
      ]
      description      = "degtlun5179.server.arvato-systems.de"
      from_port        = 2444
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 2444
    },
    {
      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          = 65534
    },
    {
      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          = 65534
    },
    {
      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.250.2.0/24",
      ]
      description      = "To CLSHRD-P CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "To CLSHRD-P CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.116.100/32",
      ]
      description      = "DX3P1-BASTION01"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
    {
      cidr_blocks = [
        "10.11.176.192/27",
        "10.12.246.0/24",
      ]
      description      = "From CCSHARE-FF-APP-1A"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.11.176.192/27",
        "10.12.246.0/24",
      ]
      description      = "From CCSHARE-FF-APP-1A"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.11.176.200/32",
      ]
      description      = "From cloudopsff-dbmonitor01"
      from_port        = 6432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 6432
    },
    {
      cidr_blocks = [
        "10.11.36.13/32",
      ]
      description      = "degtlun5179.server.arvato-systems.de"
      from_port        = 6432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 6432
    },
    {
      cidr_blocks = [
        "10.11.36.15/32",
      ]
      description      = "degtluv0334.server.arvato-systems.de"
      from_port        = 6432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 6432
    },
    {
      cidr_blocks = [
        "10.11.58.64/27",
      ]
      description      = "Graslite Prod App subnet"
      from_port        = 6432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 6432
    },
    {
      cidr_blocks = [
        "10.11.58.74/32",
      ]
      description      = "degtluv0871.server.arvato-systems.de"
      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",
        "10.250.2.64/27",
      ]
      description      = "Tower"
      from_port        = 6432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 6432
    },
    {
      cidr_blocks = [
        "10.12.246.64/27",
      ]
      description      = "ANSIBLE-TOWER"
      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      = "AnsibleTower"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
    {
      cidr_blocks      = []
      description      = "RDS-SG"
      from_port        = 6432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-00f0524f4d6d622f2",
      ]
      self    = false
      to_port = 6432
    },
  ]
  name = "DX3-P1-GRASLITEPGBOUNCER-SG"
  tags = {
    "Business-Unit" = "Digital-Exchange"
    "Environment"   = "Prod"
    "Owner"         = "Christian seitz"
    "Project-Code"  = "2000306K"
    "Project-Name"  = "SME-DX3-Prod"
    "CLOPS_FW"      = "NO"
    "Name"          = "DX3-P1-GRASLITEPGBOUNCER-SG"
  }
  tags_all = {
    "Business-Unit" = "Digital-Exchange"
    "Environment"   = "Prod"
    "Owner"         = "Christian seitz"
    "Project-Code"  = "2000306K"
    "Project-Name"  = "SME-DX3-Prod"
    "CLOPS_FW"      = "NO"
    "Name"          = "DX3-P1-GRASLITEPGBOUNCER-SG"
  }
  vpc_id = "vpc-0c22aaf78d3f32b63"

}

resource "aws_security_group" "sg-00cbebadc1b6eeb9a" {
  description = "DX3-P1-GSIRT-SG"
  egress = [
    {
      cidr_blocks = [
        "10.11.116.64/26", "10.250.243.128/25"
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.11.116.64/26", "10.250.243.128/25"
      ]
      description      = ""
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      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          = 65534
    },
    {
      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          = 65534
    },
    {
      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          = 65534
    },
    {
      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          = 65534
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "To CLSHRD-P CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "To CLSHRD-P CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.116.64/26", "10.250.243.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.11.116.64/26", "10.250.243.128/25"
      ]
      description      = "GSIRT TCP-9998"
      from_port        = 9998
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 9998
    },
    {
      cidr_blocks = [
        "10.11.176.192/27",
      ]
      description      = "From CCSHARE-FF-APP-1A"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.11.176.192/27",
      ]
      description      = "From CCSHARE-FF-APP-1A"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.12.246.64/27",
      ]
      description      = "SSH from 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      = "SSH from clshrd-tower01"
      from_port        = 22
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 22
    },
  ]
  name = "DX3-P1-GSIRT-SG"
  tags = {
    "Business-Unit" = "Digital-Exchange"
    "Environment"   = "Prod"
    "Owner"         = "Christian seitz"
    "Project-Code"  = "2000306K"
    "Project-Name"  = "SME-DX3-Prod"
    "CLOPS_FW"      = "NO"
    "Name"          = "DX3-P1-GSIRT-SG"
  }
  tags_all = {
    "Business-Unit" = "Digital-Exchange"
    "Environment"   = "Prod"
    "Owner"         = "Christian seitz"
    "Project-Code"  = "2000306K"
    "Project-Name"  = "SME-DX3-Prod"
    "CLOPS_FW"      = "NO"
    "Name"          = "DX3-P1-GSIRT-SG"
  }
  vpc_id = "vpc-0c22aaf78d3f32b63"

}

resource "aws_security_group" "sg-00f0524f4d6d622f2" {
  description = "SG rule for graslite-rds-prod RDS"
  egress = [
    {
      cidr_blocks = [
        "10.11.116.64/26", "10.250.243.128/25"
      ]
      description      = "DX3-P1 VPC_CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.11.116.64/26", "10.250.243.128/25"
      ]
      description      = "DX3-P1 VPC_CIDR"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      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          = 65534
    },
    {
      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          = 65534
    },
    {
      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          = 65534
    },
    {
      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          = 65534
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "To CLSHRD-P CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.250.2.0/24",
      ]
      description      = "To CLSHRD-P CIDR-2"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
  ]
  ingress = [
    {
      cidr_blocks = [
        "10.11.176.192/27",
      ]
      description      = "From CCSHARE-FF-APP-1A"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.11.176.192/27",
      ]
      description      = "From CCSHARE-FF-APP-1A"
      from_port        = 0
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "udp"
      security_groups  = []
      self             = false
      to_port          = 65534
    },
    {
      cidr_blocks = [
        "10.11.176.200/32",
      ]
      description      = "From cloudopsff-dbmonitor01"
      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.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      = []
      description      = "Prod Pgbouncer"
      from_port        = 5432
      ipv6_cidr_blocks = []
      prefix_list_ids  = []
      protocol         = "tcp"
      security_groups = [
        "sg-0138dfcdf7ae0a6cf",
      ]
      self    = false
      to_port = 5432
    },
  ]
  name = "graslite-rds-prod-RDS-SG"
  tags = {
    "Business-Unit" = "Digital-Exchange"
    "Environment"   = "Prod"
    "Owner"         = "Christian seitz"
    "Project-Code"  = "2000306K"
    "Project-Name"  = "SME-DX3-Prod"
    "CLOPS_FW"      = "NO"
    "Name"          = "DX3-P1-graslite-rds-prod-RDS-SG"
  }
  tags_all = {
    "Business-Unit" = "Digital-Exchange"
    "Environment"   = "Prod"
    "Owner"         = "Christian seitz"
    "Project-Code"  = "2000306K"
    "Project-Name"  = "SME-DX3-Prod"
    "CLOPS_FW"      = "NO"
    "Name"          = "DX3-P1-graslite-rds-prod-RDS-SG"
  }
  vpc_id = "vpc-0c22aaf78d3f32b63"

}

