# 韩国区域实例配置 - 导入现有资源

# ch4 实例 (原ARM)
resource "oci_core_instance" "ch4" {
  # 基本配置 - 匹配现有实例
  compartment_id      = data.consul_keys.oracle_config.var.tenancy_ocid
  availability_domain = "CSRd:AP-CHUNCHEON-1-AD-1"
  shape              = "VM.Standard.A1.Flex"
  display_name       = "ch4"
  
  shape_config {
    ocpus         = 4
    memory_in_gbs = 24
  }
  
  # 防止意外重建
  lifecycle {
    prevent_destroy = true
    ignore_changes = [
      source_details,
      metadata,
      create_vnic_details,
      time_created
    ]
  }
}

# ch2 实例
resource "oci_core_instance" "ch2" {
  # 基本配置 - 匹配现有实例
  compartment_id      = data.consul_keys.oracle_config.var.tenancy_ocid
  availability_domain = "CSRd:AP-CHUNCHEON-1-AD-1"
  shape              = "VM.Standard.E2.1.Micro"
  display_name       = "ch2"
  
  # 防止意外重建
  lifecycle {
    prevent_destroy = true
    ignore_changes = [
      source_details,
      metadata,
      create_vnic_details,
      time_created
    ]
  }
}

# ch3 实例
resource "oci_core_instance" "ch3" {
  # 基本配置 - 匹配现有实例
  compartment_id      = data.consul_keys.oracle_config.var.tenancy_ocid
  availability_domain = "CSRd:AP-CHUNCHEON-1-AD-1"
  shape              = "VM.Standard.E2.1.Micro"
  display_name       = "ch3"
  
  # 防止意外重建
  lifecycle {
    prevent_destroy = true
    ignore_changes = [
      source_details,
      metadata,
      create_vnic_details,
      time_created
    ]
  }
}