
/*
resource "aws_instance" "i-0ccf372f18a139147" {
  ami                  = "ami-02a9a52c643b56f1c"
  instance_type        = "m5.8xlarge"
  iam_instance_profile = "sme-mc-sec-prod-gen"
  vpc_security_group_ids = [
    "sg-06e0be5a149470879"
  ]
  availability_zone           = "eu-central-1a"
  key_name                    = "mcsec-p1-01April2020"
  user_data_replace_on_change = false
  tags = {
    "Name" : "mcsecp1-middletier01",
    Business-Unit  = "AOMA-Conversion-Sec",
    CLOPS_APPROVED = "YES",
    Environment    = "Prod",
    ME-Joined      = "YES",
    OPS            = "STND",
    OS             = "WIN-2012",
    Owner          = "mandar.padsalgikar@sonymusic.com",
    "Patch Group"  = "General",
    Project-Code   = "SME-2000-0306C",
    Project-Name   = "AOMA-Conversion",
    SERVER_TYPE    = "EC2",
    Environment    = "Prod",
    Terraform      = "True"
  }
  lifecycle {
    ignore_changes = [user_data]
  }
}

resource "aws_instance" "mcsecp1-middletier03" {
  ami                  = "ami-00336c768aae698ed"
  instance_type        = "m5.8xlarge"
  iam_instance_profile = "sme-mc-sec-prod-gen"
  vpc_security_group_ids = [
    "sg-06e0be5a149470879"
  ]
  availability_zone           = "eu-central-1a"
  key_name                    = "mcsec-p1-01April2020"
  user_data_replace_on_change = false
  tags = {
    "Name" : "mcsecp1-middletier03",
    Business-Unit  = "AOMA-Conversion-Sec",
    CLOPS_APPROVED = "YES",
    Environment    = "Prod",
    ME-Joined      = "YES",
    OPS            = "STND",
    OS             = "WIN-2019",
    Owner          = "mandar.padsalgikar@sonymusic.com",
    "Patch Group"  = "General",
    Project-Code   = "SME-2000-0306C",
    Project-Name   = "AOMA-Conversion",
    SERVER_TYPE    = "EC2",
    Environment    = "Prod",
    Terraform      = "True"
  }
  lifecycle {
    ignore_changes = [user_data]
  }
  root_block_device {
    delete_on_termination = true
    encrypted             = true
    iops                  = 3000
    kms_key_id            = "arn:aws:kms:eu-central-1:844930103112:key/37474eb9-4314-42a5-8cbf-a9d11fe2ecca"
    tags                  = {}
    throughput            = 125
    volume_size           = 300
    volume_type           = "gp3"
  }
}
*/

resource "aws_instance" "mcsecp1-pgbouncer03" {
  #checkov:skip=CKV_AWS_126: Ensure that detailed monitoring is enabled for EC2 instances
  #checkov:skip=CKV_AWS_79: Ensure Instance Metadata Service Version 1 is not enabled
  #checkov:skip=CKV_AWS_8: Ensure all data stored in the Launch configuration or instance Elastic Blocks Store is securely encrypted
  #checkov:skip=CKV_AWS_135: Ensure that EC2 is EBS optimized
  ami                         = "ami-064831802eae3c1b0"
  instance_type               = "t3.medium"
  iam_instance_profile        = "mconp-ec2-mcsecp1-pgbouncer01"
  vpc_security_group_ids      = [aws_security_group.sg-030982104830f4d7b.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-0b3ba946ae21cf94f.id
  associate_public_ip_address = "false"
  key_name                    = "mcsec-p1-01April2020"
  tags = {
    "Name"           = "mcsecp1-pgbouncer03",
    "Environment"    = "Prod",
    "SERVER_TYPE"    = "EC2",
    "OS"             = "AL3",
    "Patch Group"    = "General",
    "Business-Unit"  = "AOMA-Conversion",
    "Project-Code"   = "SME-2000-0306C",
    "Project-Name"   = "Media-Conversion",
    "CLOPS_APPROVED" = "YES",
    "ME-Joined"      = "NO",
    "OPS"            = "STND",
    "DATA"           = "NORMAL",
    "Owner"          = "mandar.padsalgikar@sonymusic.com",
    "Terraform"      = "True",
    "CLOPS_FW"       = "NO",
    "map-migrated"   = "migKNBMDMW06I"
  }
}
# __generated__ by Terraform
resource "aws_instance" "i-066e4f0479c7546d7" {
  #checkov:skip=CKV_AWS_126: Ensure that detailed monitoring is enabled for EC2 instances
  #checkov:skip=CKV_AWS_79: Ensure Instance Metadata Service Version 1 is not enabled
  ami                                  = "ami-00530b915b33bba1c"
  associate_public_ip_address          = false
  availability_zone                    = "eu-central-1a"
  disable_api_stop                     = false
  disable_api_termination              = false
  ebs_optimized                        = true
  get_password_data                    = false
  hibernation                          = false
  iam_instance_profile                 = "sme-mc-sec-prod-gen"
  instance_initiated_shutdown_behavior = "stop"
  instance_type                        = "m5.xlarge"
  key_name                             = "mcsec-p1-01April2020"
  monitoring                           = false

  placement_partition_number = 0
  private_ip                 = "10.11.117.103"
  secondary_private_ips      = []
  security_groups            = []
  source_dest_check          = true
  subnet_id                  = "subnet-0769f5e072fd5f71c"
  tags = {
    Business-Unit  = "AOMA-Conversion-Sec"
    CLOPS_APPROVED = "YES"
    CLOPS_FW       = "YES"
    DATA           = "NORMAL"
    Environment    = "Prod"
    ME-Joined      = "NO"
    Name           = "mcsecp1-vidchecker01"
    OPS            = "STND"
    OS             = "AL2"
    Owner          = "Mandar Padsalgikar"
    "Patch Group"  = "General"
    Project-Code   = "SME-2000-0306C"
    Project-Name   = "AOMA-Conversion"
    SERVER_TYPE    = "EC2"
    Terraform      = "False"
  }
  tags_all = {
    Business-Unit  = "AOMA-Conversion-Sec"
    CLOPS_APPROVED = "YES"
    CLOPS_FW       = "YES"
    DATA           = "NORMAL"
    Environment    = "Prod"
    ME-Joined      = "NO"
    Name           = "mcsecp1-vidchecker01"
    OPS            = "STND"
    OS             = "AL2"
    Owner          = "Mandar Padsalgikar"
    "Patch Group"  = "General"
    Project-Code   = "SME-2000-0306C"
    Project-Name   = "AOMA-Conversion"
    SERVER_TYPE    = "EC2"
    Terraform      = "False"
  }
  tenancy                = "default"
  vpc_security_group_ids = ["sg-06e0be5a149470879"]
  capacity_reservation_specification {
    capacity_reservation_preference = "open"
  }
  cpu_options {
    amd_sev_snp      = null
    core_count       = 2
    threads_per_core = 2
  }
  ebs_block_device {
    delete_on_termination = false
    device_name           = "xvdb"
    encrypted             = true
    iops                  = 3000
    kms_key_id            = "arn:aws:kms:eu-central-1:844930103112:key/37474eb9-4314-42a5-8cbf-a9d11fe2ecca"
    snapshot_id           = null
    tags                  = {}
    throughput            = 125
    volume_size           = 500
    volume_type           = "gp3"
  }
  enclave_options {
    enabled = false
  }
  maintenance_options {
    auto_recovery = "default"
  }
  metadata_options {
    http_endpoint               = "enabled"
    http_put_response_hop_limit = 1
    http_tokens                 = "optional"
    instance_metadata_tags      = "disabled"
  }
  private_dns_name_options {
    enable_resource_name_dns_a_record    = false
    enable_resource_name_dns_aaaa_record = false
    hostname_type                        = "ip-name"
  }
  root_block_device {
    delete_on_termination = true
    encrypted             = true
    iops                  = 3000
    kms_key_id            = "arn:aws:kms:eu-central-1:844930103112:key/37474eb9-4314-42a5-8cbf-a9d11fe2ecca"
    tags                  = {}
    throughput            = 125
    volume_size           = 300
    volume_type           = "gp3"
  }
}

# __generated__ by Terraform
resource "aws_instance" "i-086be12d629854593" {
  #checkov:skip=CKV_AWS_126: Ensure that detailed monitoring is enabled for EC2 instances
  #checkov:skip=CKV_AWS_79: Ensure Instance Metadata Service Version 1 is not enabled
  ami                                  = "ami-0d35119e7327cd371"
  associate_public_ip_address          = false
  availability_zone                    = "eu-central-1a"
  disable_api_stop                     = false
  disable_api_termination              = false
  ebs_optimized                        = true
  get_password_data                    = false
  hibernation                          = false
  iam_instance_profile                 = "sme-mc-sec-prod-gen"
  instance_initiated_shutdown_behavior = "stop"
  instance_type                        = "m5.8xlarge"
  key_name                             = "mcsec-p1-01April2020"
  monitoring                           = false

  placement_partition_number = 0
  private_ip                 = "10.11.117.108"
  secondary_private_ips      = []
  security_groups            = []
  source_dest_check          = true
  subnet_id                  = "subnet-0769f5e072fd5f71c"
  tags = {
    Business-Unit  = "AOMA-Conversion-Sec"
    CLOPS_APPROVED = "YES"
    CLOPS_FW       = "YES"
    DATA           = "NORMAL"
    Environment    = "Prod"
    ME-Joined      = "NO"
    Name           = "mcsecp1-vantage02"
    OPS            = "STND"
    OS             = "WIN-2019"
    Owner          = "Mandar"
    "Patch Group"  = "General"
    Project-Code   = "SME-2000-0306C"
    Project-Name   = "AOMA-Conversion"
    SERVER_TYPE    = "EC2"
    Terraform      = "False"
  }
  tags_all = {
    Business-Unit  = "AOMA-Conversion-Sec"
    CLOPS_APPROVED = "YES"
    CLOPS_FW       = "YES"
    DATA           = "NORMAL"
    Environment    = "Prod"
    ME-Joined      = "NO"
    Name           = "mcsecp1-vantage02"
    OPS            = "STND"
    OS             = "WIN-2019"
    Owner          = "Mandar"
    "Patch Group"  = "General"
    Project-Code   = "SME-2000-0306C"
    Project-Name   = "AOMA-Conversion"
    SERVER_TYPE    = "EC2"
    Terraform      = "False"
  }
  tenancy                = "default"
  vpc_security_group_ids = ["sg-06e0be5a149470879"]
  capacity_reservation_specification {
    capacity_reservation_preference = "open"
  }
  cpu_options {
    amd_sev_snp      = null
    core_count       = 16
    threads_per_core = 2
  }
  ebs_block_device {
    delete_on_termination = false
    device_name           = "xvdf"
    encrypted             = true
    iops                  = 16000
    kms_key_id            = "arn:aws:kms:eu-central-1:844930103112:key/37474eb9-4314-42a5-8cbf-a9d11fe2ecca"
    snapshot_id           = "snap-07a3fcff85a437393"
    tags                  = {}
    throughput            = 250
    volume_size           = 10000
    volume_type           = "gp3"
  }
  ebs_block_device {
    delete_on_termination = false
    device_name           = "xvdh"
    encrypted             = true
    iops                  = 12300
    kms_key_id            = "arn:aws:kms:eu-central-1:844930103112:key/37474eb9-4314-42a5-8cbf-a9d11fe2ecca"
    snapshot_id           = "snap-0bf026343f9568f12"
    tags                  = {}
    throughput            = 250
    volume_size           = 4100
    volume_type           = "gp3"
  }
  enclave_options {
    enabled = false
  }
  maintenance_options {
    auto_recovery = "default"
  }
  metadata_options {
    http_endpoint               = "enabled"
    http_put_response_hop_limit = 1
    http_tokens                 = "optional"
    instance_metadata_tags      = "disabled"
  }
  private_dns_name_options {
    enable_resource_name_dns_a_record    = false
    enable_resource_name_dns_aaaa_record = false
    hostname_type                        = "ip-name"
  }
  root_block_device {
    delete_on_termination = false
    encrypted             = true
    iops                  = 6000
    kms_key_id            = "arn:aws:kms:eu-central-1:844930103112:key/37474eb9-4314-42a5-8cbf-a9d11fe2ecca"
    tags                  = {}
    throughput            = 150
    volume_size           = 200
    volume_type           = "gp3"
  }
}
