37 lines
914 B
HCL
37 lines
914 B
HCL
resource "oci_core_instance" "email" {
|
|
count = var.enabled ? 1 : 0
|
|
|
|
availability_domain = var.availability_domain
|
|
compartment_id = var.compartment_id
|
|
display_name = var.display_name
|
|
shape = var.shape
|
|
|
|
shape_config {
|
|
ocpus = var.ocpus
|
|
memory_in_gbs = var.memory_in_gbs
|
|
}
|
|
|
|
source_details {
|
|
source_type = "image"
|
|
source_id = var.image_id
|
|
boot_volume_size_in_gbs = var.boot_volume_size_in_gbs
|
|
}
|
|
|
|
create_vnic_details {
|
|
subnet_id = var.subnet_id
|
|
assign_public_ip = var.assign_public_ip
|
|
hostname_label = var.hostname_label
|
|
skip_source_dest_check = false
|
|
nsg_ids = var.nsg_ids
|
|
}
|
|
|
|
metadata = {
|
|
ssh_authorized_keys = var.ssh_public_key
|
|
}
|
|
|
|
freeform_tags = merge(var.freeform_tags, {
|
|
managed_by = "jeannie"
|
|
purpose = "email-learning"
|
|
})
|
|
}
|