# resource "aws_instance" "i-02a07d501fd3c5a56" {
#   ami                  = "ami-0203e1f4e10f78261"
#   instance_type        = "m5.xlarge"
#   iam_instance_profile = "lcsd-grpsd2-pgbouncer02"
#   vpc_security_group_ids = [
#     "sg-05644a1b70b52fbfa"
#   ]
#   availability_zone = "eu-central-1a"
#   key_name          = "lcsd-04may2020"
#   tags = merge(
#     var.common_tags,
#     var.cloudops_firewall_protected_tag,
#     {
#       Name                     = "grpsd2-pgbouncer02",
#       Environment              = "Dev",
#       SERVER_TYPE              = "EC2",
#       OS                       = "AL2",
#       "Patch Group"            = "General",
#       aws-migration-project-id = "MPE22602",
#       map-migrated             = "d-server-0174a2wn5rache",
#       CLOPS_APPROVED           = "YES",
#       ME-Joined                = "NO"

#     }
#   )
#   lifecycle {
#     ignore_changes = [user_data]
#   }
# }

# resource "aws_instance" "i-09a53fec3a4526699" {
#   ami                  = "ami-0203e1f4e10f78261"
#   instance_type        = "t3.medium"
#   iam_instance_profile = "lcsd-grpsd2-int-pgbouncer02"
#   vpc_security_group_ids = [
#     "sg-05ec532e8015c2052"
#   ]
#   availability_zone = "eu-central-1a"
#   key_name          = "lcsd-04may2020"
#   tags = merge(
#     var.common_tags,
#     var.cloudops_firewall_protected_tag,
#     {
#       Name                     = "grpsd2-int-pgbouncer02",
#       Environment              = "Dev",
#       SERVER_TYPE              = "EC2",
#       OS                       = "AL2",
#       "Patch Group"            = "General",
#       ME-Joined                = "NO",
#       aws-migration-project-id = "MPE22602",
#       map-migrated             = "d-server-0174a2wn5rache",
#       CLOPS_APPROVED           = "YES"
#     }
#   )
#   lifecycle {
#     ignore_changes = [user_data]
#   }
# }

# resource "aws_instance" "i-05fba7dba35df3f4a" {
#   ami                  = "ami-014cb8328dc8c8452"
#   instance_type        = "t3.medium"
#   iam_instance_profile = "lcsd-grpsd2-int-pgbouncer02"
#   vpc_security_group_ids = [
#     "sg-05ec532e8015c2052"
#   ]
#   availability_zone = "eu-central-1a"
#   key_name          = "lcsd-04may2020"
#   tags = merge(
#     var.common_tags,
#     var.cloudops_firewall_protected_tag,
#     {
#       Name                     = "grpsd2-demo-pgbouncer01",
#       Environment              = "Dev",
#       SERVER_TYPE              = "EC2",
#       OS                       = "AL2",
#       "Patch Group"            = "General",
#       aws-migration-project-id = "MPE22602",
#       map-migrated             = "d-server-0174a2wn5rache",
#       CLOPS_APPROVED           = "YES",
#       ME-Joined                = "NO"
#     }
#   )
#   lifecycle {
#     ignore_changes = [user_data]
#   }
# }

resource "aws_instance" "grpsd2-application03" {
  # checkov:skip=CKV_AWS_8:Ensure all data stored in the Launch configuration EBS is securely encrypted
  # checkov:skip=CKV_AWS_79:Ensure Instance Metadata Service Version 1 is not enabled
  # checkov:skip=CKV_AWS_126:Ensure that detailed monitoring is enabled for EC2 instances
  # checkov:skip=CKV_AWS_135:Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "t3.medium"
  iam_instance_profile        = "lcsd-grpsd2-application02"
  vpc_security_group_ids      = [aws_security_group.sg-0d7d1dd1c5f3ea3e1.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-084fff3deeba8d595.id
  associate_public_ip_address = "false"
  key_name                    = "lcsd-04may2020"
  tags = {
    "Name"           = "grpsd2-application03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Dev",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "CLOPS_APPROVED" = "YES",
    "ME_JOINED"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "OWNER"          = "richard.mayer@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "YES",
    "Team-Name"      = "GRPS"
  }
}

resource "aws_instance" "grpsd2-demo-pgbouncer03" {
  # checkov:skip=CKV_AWS_8:Ensure all data stored in the Launch configuration EBS is securely encrypted
  # checkov:skip=CKV_AWS_79:Ensure Instance Metadata Service Version 1 is not enabled
  # checkov:skip=CKV_AWS_126:Ensure that detailed monitoring is enabled for EC2 instances
  # checkov:skip=CKV_AWS_135:Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "t3.medium"
  iam_instance_profile        = "lcsd-grpsd2-int-pgbouncer02"
  vpc_security_group_ids      = [aws_security_group.sg-05ec532e8015c2052.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-0527845886cfd91e1.id
  associate_public_ip_address = "false"
  key_name                    = "lcsd-04may2020"
  tags = {
    "Name"           = "grpsd2-demo-pgbouncer03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Dev",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "CLOPS_APPROVED" = "YES",
    "ME_JOINED"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "OWNER"          = "richard.mayer@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "YES",
    "Team-Name"      = "GRPS"
  }
}

resource "aws_instance" "grpsd2-int-pgbouncer03" {
  # checkov:skip=CKV_AWS_8:Ensure all data stored in the Launch configuration EBS is securely encrypted
  # checkov:skip=CKV_AWS_79:Ensure Instance Metadata Service Version 1 is not enabled
  # checkov:skip=CKV_AWS_126:Ensure that detailed monitoring is enabled for EC2 instances
  # checkov:skip=CKV_AWS_135:Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "t3.medium"
  iam_instance_profile        = "lcsd-grpsd2-int-pgbouncer02"
  vpc_security_group_ids      = [aws_security_group.sg-05ec532e8015c2052.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-084fff3deeba8d595.id
  associate_public_ip_address = "false"
  key_name                    = "lcsd-04may2020"
  tags = {
    "Name"           = "grpsd2-int-pgbouncer03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Dev",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "CLOPS_APPROVED" = "YES",
    "ME_JOINED"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "OWNER"          = "richard.mayer@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "YES",
    "Team-Name"      = "GRPS"
  }
}

resource "aws_instance" "grpsd2-pgbouncer03" {
  # checkov:skip=CKV_AWS_8:Ensure all data stored in the Launch configuration EBS is securely encrypted
  # checkov:skip=CKV_AWS_79:Ensure Instance Metadata Service Version 1 is not enabled
  # checkov:skip=CKV_AWS_126:Ensure that detailed monitoring is enabled for EC2 instances
  # checkov:skip=CKV_AWS_135:Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "m5.xlarge"
  iam_instance_profile        = "lcsd-grpsd2-pgbouncer02"
  vpc_security_group_ids      = [aws_security_group.sg-05644a1b70b52fbfa.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-084fff3deeba8d595.id
  associate_public_ip_address = "false"
  key_name                    = "lcsd-04may2020"
  tags = {
    "Name"           = "grpsd2-pgbouncer03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Dev",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "CLOPS_APPROVED" = "YES",
    "ME_JOINED"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "OWNER"          = "richard.mayer@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "YES",
    "Team-Name"      = "GRPS"
  }
}

resource "aws_instance" "grpsd2-pgedb03" {
  # checkov:skip=CKV_AWS_8:Ensure all data stored in the Launch configuration EBS is securely encrypted
  # checkov:skip=CKV_AWS_79:Ensure Instance Metadata Service Version 1 is not enabled
  # checkov:skip=CKV_AWS_126:Ensure that detailed monitoring is enabled for EC2 instances
  # checkov:skip=CKV_AWS_135:Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "r5a.xlarge"
  iam_instance_profile        = "sme-labelcopy-schedule-dev-gen"
  vpc_security_group_ids      = [aws_security_group.sg-004daf8155467cdf4.id, aws_security_group.sg-09bd75b1fdea22e43.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-084fff3deeba8d595.id
  associate_public_ip_address = "false"
  key_name                    = "lcsd-04may2020"
  tags = {
    "Name"           = "grpsd2-pgedb03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Dev",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "CLOPS_APPROVED" = "YES",
    "ME_JOINED"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "OWNER"          = "richard.mayer@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "YES",
    "Team-Name"      = "GRPS"
  }
}

resource "aws_instance" "grpsd2-symmetricds03" {
  # checkov:skip=CKV_AWS_8:Ensure all data stored in the Launch configuration EBS is securely encrypted
  # checkov:skip=CKV_AWS_79:Ensure Instance Metadata Service Version 1 is not enabled
  # checkov:skip=CKV_AWS_126:Ensure that detailed monitoring is enabled for EC2 instances
  # checkov:skip=CKV_AWS_135:Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "m7i.xlarge"
  iam_instance_profile        = "sme-labelcopy-schedule-dev-gen"
  vpc_security_group_ids      = [aws_security_group.sg-0c3fce58db20cfa5d.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-0fe077bb20ec8bbb1.id
  associate_public_ip_address = "false"
  key_name                    = "lcsd-04may2020"
  tags = {
    "Name"           = "grpsd2-symmetricds03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Dev",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "CLOPS_APPROVED" = "YES",
    "ME_JOINED"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "OWNER"          = "richard.mayer@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "YES",
    "Team-Name"      = "GRPS"
  }
}

resource "aws_instance" "grpsd2-utilities03" {
  # checkov:skip=CKV_AWS_8:Ensure all data stored in the Launch configuration EBS is securely encrypted
  # checkov:skip=CKV_AWS_79:Ensure Instance Metadata Service Version 1 is not enabled
  # checkov:skip=CKV_AWS_126:Ensure that detailed monitoring is enabled for EC2 instances
  # checkov:skip=CKV_AWS_135:Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "t3.medium"
  iam_instance_profile        = "lcsd-grpsd2-utilities01"
  vpc_security_group_ids      = [aws_security_group.sg-03d00384a05c6b8c6.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-0527845886cfd91e1.id
  associate_public_ip_address = "false"
  key_name                    = "lcsd-04may2020"
  tags = {
    "Name"           = "grpsd2-utilities03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Dev",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "CLOPS_APPROVED" = "YES",
    "ME_JOINED"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "OWNER"          = "richard.mayer@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "YES",
    "Team-Name"      = "GRPS"
  }
}

resource "aws_instance" "grpsd2-int-ro-pgbouncer03" {
  # checkov:skip=CKV_AWS_8:Ensure all data stored in the Launch configuration EBS is securely encrypted
  # checkov:skip=CKV_AWS_79:Ensure Instance Metadata Service Version 1 is not enabled
  # checkov:skip=CKV_AWS_126:Ensure that detailed monitoring is enabled for EC2 instances
  # checkov:skip=CKV_AWS_135:Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "t3.medium"
  iam_instance_profile        = "lcsd-grpsd2-int-pgbouncer02"
  vpc_security_group_ids      = [aws_security_group.sg-05ec532e8015c2052.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-0c6709abf71b43246.id
  associate_public_ip_address = "false"
  key_name                    = "lcsd-04may2020"
  tags = {
    "Name"           = "grpsd2-int-ro-pgbouncer03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Dev",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "CLOPS_APPROVED" = "YES",
    "ME_JOINED"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "OWNER"          = "richard.mayer@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "YES",
    "Team-Name"      = "GRPS"
  }
}
