parent
15a2c60662
commit
d2c28b2c2a
8 changed files with 297 additions and 116 deletions
@ -0,0 +1,102 @@ |
||||
resource "oci_core_instance" "lon-kubeworker-g0" { |
||||
availability_domain = "JnpY:UK-LONDON-1-AD-3" |
||||
compartment_id = var.compartment_ocid |
||||
display_name = "lon-kubeworker-g0" |
||||
shape = "VM.Standard.A1.Flex" |
||||
|
||||
# preserve the volume if instance is deleted |
||||
preserve_boot_volume = true |
||||
|
||||
source_details { |
||||
source_type = "image" |
||||
# https://docs.oracle.com/en-us/iaas/images/ubuntu-2004/ |
||||
source_id = "ocid1.image.oc1.uk-london-1.aaaaaaaaajga6k2rnywbyuyvwpw446vcfcokumn4ddrjpdvrddqhhlfvanuq" |
||||
boot_volume_size_in_gbs = "50" |
||||
} |
||||
|
||||
metadata = { |
||||
ssh_authorized_keys = var.ssh_public_key |
||||
} |
||||
|
||||
timeouts { |
||||
create = "60m" |
||||
} |
||||
|
||||
agent_config { |
||||
are_all_plugins_disabled = true |
||||
is_management_disabled = true |
||||
is_monitoring_disabled = true |
||||
} |
||||
create_vnic_details { |
||||
assign_public_ip = false |
||||
private_ip = var.lon_instances_ips["lon-kubeworker-g0"] |
||||
skip_source_dest_check = true |
||||
subnet_id = oci_core_subnet.sshonly.id |
||||
display_name = "lon-kubeworker-g0_vnic" |
||||
hostname_label = "lon-kubeworker-g0" |
||||
#nsg_ids = [ oci_core_security_list.ssh.id ] |
||||
} |
||||
shape_config { |
||||
memory_in_gbs = "6" |
||||
ocpus = "1" |
||||
} |
||||
} |
||||
resource "cloudflare_record" "lon-kubeworker-g0" { |
||||
zone_id = cloudflare_zone.sudois.id |
||||
type = "A" |
||||
name = "lon-kubeworker-g0.lon" |
||||
value = oci_core_instance.lon-kubeworker-g0.private_ip |
||||
ttl = 60 |
||||
} |
||||
|
||||
|
||||
# resource "oci_core_instance" "lon-kubeworker-g1" { |
||||
# availability_domain = "JnpY:UK-LONDON-1-AD-3" |
||||
# compartment_id = var.compartment_ocid |
||||
# display_name = "lon-kubeworker-g1" |
||||
# shape = "VM.Standard.A1.Flex" |
||||
|
||||
# # preserve the volume if instance is deleted |
||||
# preserve_boot_volume = true |
||||
|
||||
# source_details { |
||||
# source_type = "image" |
||||
# # https://docs.oracle.com/en-us/iaas/images/ubuntu-2004/ |
||||
# source_id = "ocid1.image.oc1.uk-london-1.aaaaaaaaajga6k2rnywbyuyvwpw446vcfcokumn4ddrjpdvrddqhhlfvanuq" |
||||
# boot_volume_size_in_gbs = "50" |
||||
# } |
||||
|
||||
# metadata = { |
||||
# ssh_authorized_keys = var.ssh_public_key |
||||
# } |
||||
|
||||
# timeouts { |
||||
# create = "60m" |
||||
# } |
||||
|
||||
# agent_config { |
||||
# are_all_plugins_disabled = true |
||||
# is_management_disabled = true |
||||
# is_monitoring_disabled = true |
||||
# } |
||||
# create_vnic_details { |
||||
# assign_public_ip = false |
||||
# private_ip = var.lon_instances_ips["lon-kubeworker-g1"] |
||||
# skip_source_dest_check = true |
||||
# subnet_id = oci_core_subnet.sshonly.id |
||||
# display_name = "lon-kubeworker-g1_vnic" |
||||
# hostname_label = "lon-kubeworker-g1" |
||||
# #nsg_ids = [ oci_core_security_list.ssh.id ] |
||||
# } |
||||
# shape_config { |
||||
# memory_in_gbs = "6" |
||||
# ocpus = "1" |
||||
# } |
||||
# } |
||||
# resource "cloudflare_record" "lon-kubeworker-g1" { |
||||
# zone_id = cloudflare_zone.sudois.id |
||||
# type = "A" |
||||
# name = "lon-kubeworker-g1.lon" |
||||
# value = oci_core_instance.lon-kubeworker-g1.private_ip |
||||
# ttl = 60 |
||||
# } |
@ -0,0 +1,72 @@ |
||||
resource "oci_core_instance" "lon-mon-g0" { |
||||
availability_domain = "JnpY:UK-LONDON-1-AD-3" |
||||
compartment_id = var.compartment_ocid |
||||
display_name = "lon-mon-g0" |
||||
shape = "VM.Standard.A1.Flex" |
||||
|
||||
# preserve the volume if instance is deleted |
||||
preserve_boot_volume = true |
||||
|
||||
source_details { |
||||
source_type = "image" |
||||
# https://docs.oracle.com/en-us/iaas/images/ubuntu-2004/ |
||||
source_id = "ocid1.image.oc1.uk-london-1.aaaaaaaaajga6k2rnywbyuyvwpw446vcfcokumn4ddrjpdvrddqhhlfvanuq" |
||||
boot_volume_size_in_gbs = "50" |
||||
} |
||||
|
||||
metadata = { |
||||
ssh_authorized_keys = var.ssh_public_key |
||||
} |
||||
|
||||
timeouts { |
||||
create = "60m" |
||||
} |
||||
|
||||
agent_config { |
||||
are_all_plugins_disabled = true |
||||
is_management_disabled = true |
||||
is_monitoring_disabled = true |
||||
} |
||||
create_vnic_details { |
||||
assign_public_ip = true |
||||
private_ip = var.lon_instances_ips["lon-mon-g0"] |
||||
skip_source_dest_check = true |
||||
subnet_id = oci_core_subnet.ssh-https.id |
||||
display_name = "lon-mon-g0_vnic" |
||||
hostname_label = "lon-mon-g0" |
||||
#nsg_ids = [ oci_core_security_list.ssh.id ] |
||||
} |
||||
shape_config { |
||||
memory_in_gbs = "6" |
||||
ocpus = "1" |
||||
} |
||||
} |
||||
# terraform import "oci_core_vnic_attachment.lon-mon-g0_vnic" ocid1.vnicattachment.oc1.uk-london-1.anwgiljsyefuk7ycqco7uueex7n3yzwlenaxlh2rthm4dszrqwcfgsur4enq |
||||
# resource "oci_core_vnic_attachment" "lon-mon-g0_vnic" { |
||||
# instance_id = oci_core_instance.lon-mon-g0.id |
||||
|
||||
# create_vnic_details { |
||||
# assign_public_ip = true |
||||
# private_ip = var.lon_instances_ips["lon-mon-g0"] |
||||
# skip_source_dest_check = true |
||||
# subnet_id = oci_core_subnet.ssh-https.id |
||||
# display_name = "lon-mon-g0_vnic" |
||||
# hostname_label = "lon-mon-g0" |
||||
# } |
||||
# } |
||||
# # terraform import "oci_core_private_ip.lon-mon-g0" ocid1.privateip.oc1.uk-london-1.abwgiljsdbqpvyvgyczxzqtdqndalgibmcc4vbocklvbji2v4fuzk2idrifq |
||||
# resource "oci_core_private_ip" "lon-mon-g0" { |
||||
# ip_address = var.lon_instances_ips["lon-mon-g0"] |
||||
# vnic_id = oci_core_vnic_attachment.lon-mon-g0_vnic.vnic_id |
||||
# } |
||||
|
||||
resource "cloudflare_record" "lon-mon-g0" { |
||||
zone_id = cloudflare_zone.sudois.id |
||||
type = "A" |
||||
name = "lon-mon-g0.lon" |
||||
value = oci_core_instance.lon-mon-g0.public_ip |
||||
ttl = 60 |
||||
} |
||||
# data "oci_core_private_ip" "imported_lon-mon-g0" { |
||||
# private_ip_id = "ocid1.privateip.oc1.uk-london-1.abwgiljsswdgcav62ktbc4lgu3dctjd5y7534hkusyhl67el57pce3p3arpq" |
||||
# } |
Loading…
Reference in new issue