|
| 1 | +resource "oci_core_instance" "GlusterServerInstance" { |
| 2 | + availability_domain = "${oci_core_subnet.SubnetAD1.availability_domain}" |
| 3 | + compartment_id = "${var.compartment_ocid}" |
| 4 | + display_name = "glusterfs-server1" |
| 5 | + hostname_label = "glusterfs-server1" |
| 6 | + image = "${lookup(data.oci_core_images.ServerImageList.images[0], "id")}" |
| 7 | + shape = "${var.ServerInstanceShape}" |
| 8 | + subnet_id = "${oci_core_subnet.SubnetAD1.id}" |
| 9 | + metadata { |
| 10 | + ssh_authorized_keys = "${var.ssh_public_key}" |
| 11 | + user_data = "${base64encode(file(var.ServerBootStrapFile))}" |
| 12 | + } |
| 13 | +} |
| 14 | + |
| 15 | +resource "oci_core_instance" "GlusterServerInstance2" { |
| 16 | + availability_domain = "${oci_core_subnet.SubnetAD2.availability_domain}" |
| 17 | + compartment_id = "${var.compartment_ocid}" |
| 18 | + display_name = "glusterfs-server2" |
| 19 | + hostname_label = "glusterfs-server2" |
| 20 | + image = "${lookup(data.oci_core_images.ServerImageList.images[0], "id")}" |
| 21 | + shape = "${var.ServerInstanceShape}" |
| 22 | + subnet_id = "${oci_core_subnet.SubnetAD2.id}" |
| 23 | + metadata { |
| 24 | + ssh_authorized_keys = "${var.ssh_public_key}" |
| 25 | + user_data = "${base64encode(file(var.ServerBootStrapFile))}" |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +resource "oci_core_instance" "GlusterServerInstance3" { |
| 30 | + availability_domain = "${oci_core_subnet.SubnetAD3.availability_domain}" |
| 31 | + compartment_id = "${var.compartment_ocid}" |
| 32 | + display_name = "glusterfs-server3" |
| 33 | + hostname_label = "glusterfs-server3" |
| 34 | + image = "${lookup(data.oci_core_images.ServerImageList.images[0], "id")}" |
| 35 | + shape = "${var.ServerInstanceShape}" |
| 36 | + subnet_id = "${oci_core_subnet.SubnetAD3.id}" |
| 37 | + metadata { |
| 38 | + ssh_authorized_keys = "${var.ssh_public_key}" |
| 39 | + user_data = "${base64encode(file(var.ServerBootStrapFile))}" |
| 40 | + } |
| 41 | +} |
| 42 | + |
| 43 | + |
| 44 | +resource "oci_core_instance" "GlusterClientInstance" { |
| 45 | + availability_domain = "${oci_core_subnet.SubnetAD1.availability_domain}" |
| 46 | + compartment_id = "${var.compartment_ocid}" |
| 47 | + display_name = "glusterfs-client1" |
| 48 | + hostname_label = "glusterfs-client1" |
| 49 | + image = "${lookup(data.oci_core_images.ClientImageList.images[0], "id")}" |
| 50 | + shape = "${var.ClientInstanceShape}" |
| 51 | + subnet_id = "${oci_core_subnet.SubnetAD1.id}" |
| 52 | + metadata { |
| 53 | + ssh_authorized_keys = "${var.ssh_public_key}" |
| 54 | + user_data = "${base64encode(file(var.ClientBootStrapFile))}" |
| 55 | + } |
| 56 | +} |
| 57 | + |
| 58 | +resource "oci_core_instance" "GlusterClientInstance2" { |
| 59 | + availability_domain = "${oci_core_subnet.SubnetAD2.availability_domain}" |
| 60 | + compartment_id = "${var.compartment_ocid}" |
| 61 | + display_name = "glusterfs-client2" |
| 62 | + hostname_label = "glusterfs-client2" |
| 63 | + image = "${lookup(data.oci_core_images.ClientImageList.images[0], "id")}" |
| 64 | + shape = "${var.ClientInstanceShape}" |
| 65 | + subnet_id = "${oci_core_subnet.SubnetAD2.id}" |
| 66 | + metadata { |
| 67 | + ssh_authorized_keys = "${var.ssh_public_key}" |
| 68 | + user_data = "${base64encode(file(var.ClientBootStrapFile))}" |
| 69 | + } |
| 70 | +} |
| 71 | + |
| 72 | +resource "oci_core_instance" "GlusterClientInstance3" { |
| 73 | + availability_domain = "${oci_core_subnet.SubnetAD3.availability_domain}" |
| 74 | + compartment_id = "${var.compartment_ocid}" |
| 75 | + display_name = "glusterfs-client3" |
| 76 | + hostname_label = "glusterfs-client3" |
| 77 | + image = "${lookup(data.oci_core_images.ClientImageList.images[0], "id")}" |
| 78 | + shape = "${var.ClientInstanceShape}" |
| 79 | + subnet_id = "${oci_core_subnet.SubnetAD3.id}" |
| 80 | + metadata { |
| 81 | + ssh_authorized_keys = "${var.ssh_public_key}" |
| 82 | + user_data = "${base64encode(file(var.ClientBootStrapFile))}" |
| 83 | + } |
| 84 | +} |
| 85 | + |
0 commit comments