# 导入现有的美国区实例 - 不创建新资源，只管理现有的

# ash1d 实例
resource "oci_core_instance" "ash1d" {
  provider = oci.us
  
  # 基本配置 - 匹配现有实例
  compartment_id      = data.consul_keys.oracle_config_us.var.tenancy_ocid
  availability_domain = "TZXJ:US-ASHBURN-AD-1"
  shape              = "VM.Standard.E2.1.Micro"
  display_name       = "ash1d"
  
  # 防止意外重建
  lifecycle {
    prevent_destroy = true
    ignore_changes = [
      source_details,
      metadata,
      create_vnic_details,
      time_created
    ]
  }
}

# ash2e 实例
resource "oci_core_instance" "ash2e" {
  provider = oci.us
  
  # 基本配置 - 匹配现有实例
  compartment_id      = data.consul_keys.oracle_config_us.var.tenancy_ocid
  availability_domain = "TZXJ:US-ASHBURN-AD-1"
  shape              = "VM.Standard.E2.1.Micro"
  display_name       = "ash2e"
  
  # 防止意外重建
  lifecycle {
    prevent_destroy = true
    ignore_changes = [
      source_details,
      metadata,
      create_vnic_details,
      time_created
    ]
  }
}

# ash3c 实例  
resource "oci_core_instance" "ash3c" {
  provider = oci.us
  
  # 基本配置 - 匹配现有实例
  compartment_id      = data.consul_keys.oracle_config_us.var.tenancy_ocid
  availability_domain = "TZXJ:US-ASHBURN-AD-1"
  shape              = "VM.Standard.A1.Flex"
  display_name       = "ash3c"
  
  shape_config {
    ocpus         = 4
    memory_in_gbs = 24
  }
  
  # 防止意外重建
  lifecycle {
    prevent_destroy = true
    ignore_changes = [
      source_details,
      metadata,
      create_vnic_details,
      time_created
    ]
  }
}