# resource "aws_instance" "i-025c9073a466ab7ea" {
#   ami                  = "ami-0e4e23e8027052186"
#   instance_type        = "t3.medium"
#   iam_instance_profile = "lcsp-grpsp2-dbspsme1-nv-pgb01"
#   vpc_security_group_ids = [
#     "sg-0cca7203cbb6e778b"
#   ]
#   availability_zone = "us-east-1b"
#   key_name          = "lcsp-use1-25nov2022"
#   tags = merge(
#     var.common_tags,
#     {
#       Name           = "grpsp2-dbspsme1-nv-pgb01",
#       SERVER_TYPE    = "EC2",
#       OS             = "AL2",
#       "Patch Group"  = "General",
#       CLOPS_APPROVED = "YES",
#       ME-Joined      = "NO",
#       CLOPS_FW       = "YES"
#     }
#   )
#   lifecycle {
#     ignore_changes = [user_data]
#   }
# }

resource "aws_instance" "grpsp2-dbspsme1-nv-pgb03" {
  # 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
  # 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 EBS is securely encrypted
  ami                         = "ami-07ff74ba03f2ea586"
  instance_type               = "m5.xlarge"
  iam_instance_profile        = "lcsp-grpsp2-dbspsme1-nv-pgb01"
  vpc_security_group_ids      = [aws_security_group.sg-0cca7203cbb6e778b.id]
  disable_api_termination     = "true"
  subnet_id                   = aws_subnet.subnet-0ebc0635371a7ad3d.id
  associate_public_ip_address = "false"
  key_name                    = "lcsp-use1-25nov2022"
  tags = {
    "Name"           = "grpsp2-dbspsme1-nv-pgb03",
    "Business-Unit"  = "GRPS",
    "Project-Code"   = "SME-2000-0497G"
    "Project-Name"   = "GRPS"
    "Environment"    = "Prod",
    "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"
  }
}
