|
| 1 | + |
| 2 | + # Need to have this block even though it's empty; for import testing |
| 3 | + provider "oci" { |
| 4 | + } |
| 5 | + |
| 6 | + variable "tenancy_ocid" { |
| 7 | + } |
| 8 | + |
| 9 | + variable "ssh_public_key" { |
| 10 | + } |
| 11 | + |
| 12 | + variable "region" { |
| 13 | + default = "us-ashburn-1" |
| 14 | + } |
| 15 | + |
| 16 | + |
| 17 | +data "oci_bds_bds_instance_get_os_patch" "test_bds_instance_get_os_patch" { |
| 18 | +bds_instance_id = "${oci_bds_bds_instance.test_bds_instance.id}" |
| 19 | +os_patch_version = "${var.os_patch_version}" |
| 20 | +} |
| 21 | +variable "compartment_id" {} |
| 22 | +variable "subnet_id" { } |
| 23 | +variable "os_patch_version" { default = "ol7.9-x86_64-1.24.0.100-0.0" } |
| 24 | + |
| 25 | +resource "oci_bds_bds_instance" "test_bds_instance" { |
| 26 | +cluster_admin_password = "T3JhY2xlVGVhbVVTQSExMjM=" |
| 27 | +cluster_public_key = "${var.ssh_public_key}" |
| 28 | +cluster_version = "ODH1" |
| 29 | +compartment_id = "${var.compartment_id}" |
| 30 | +compute_only_worker_node { |
| 31 | +block_volume_size_in_gbs = "150" |
| 32 | +number_of_nodes = "2" |
| 33 | +shape = "VM.Standard.E4.Flex" |
| 34 | +shape_config { |
| 35 | +memory_in_gbs = "32" |
| 36 | +ocpus = "3" |
| 37 | +} |
| 38 | +subnet_id = "${var.subnet_id}" |
| 39 | +} |
| 40 | +display_name = "displayName" |
| 41 | +edge_node { |
| 42 | +block_volume_size_in_gbs = "150" |
| 43 | +number_of_nodes = "2" |
| 44 | +shape = "VM.Standard.E4.Flex" |
| 45 | +shape_config { |
| 46 | +memory_in_gbs = "32" |
| 47 | +ocpus = "3" |
| 48 | +} |
| 49 | +subnet_id = "${var.subnet_id}" |
| 50 | +} |
| 51 | +is_high_availability = "true" |
| 52 | +is_secure = "true" |
| 53 | +master_node { |
| 54 | +block_volume_size_in_gbs = "150" |
| 55 | +number_of_nodes = "2" |
| 56 | +shape = "VM.Standard.E4.Flex" |
| 57 | +shape_config { |
| 58 | +memory_in_gbs = "32" |
| 59 | +ocpus = "3" |
| 60 | +} |
| 61 | +subnet_id = "${var.subnet_id}" |
| 62 | +} |
| 63 | +util_node { |
| 64 | +block_volume_size_in_gbs = "150" |
| 65 | +number_of_nodes = "2" |
| 66 | +shape = "VM.Standard.E4.Flex" |
| 67 | +shape_config { |
| 68 | +memory_in_gbs = "32" |
| 69 | +ocpus = "3" |
| 70 | +} |
| 71 | +subnet_id = "${var.subnet_id}" |
| 72 | +} |
| 73 | +worker_node { |
| 74 | +block_volume_size_in_gbs = "150" |
| 75 | +number_of_nodes = "3" |
| 76 | +shape = "VM.Standard2.4" |
| 77 | +subnet_id = "${var.subnet_id}" |
| 78 | +} |
| 79 | +} |
| 80 | + |
| 81 | +resource "oci_core_subnet" "test_subnet" { |
| 82 | +cidr_block = "10.0.0.0/24" |
| 83 | +compartment_id = "${var.compartment_id}" |
| 84 | +lifecycle { |
| 85 | +ignore_changes = ["defined_tags"] |
| 86 | +} |
| 87 | +vcn_id = "${oci_core_vcn.test_vcn.id}" |
| 88 | +} |
| 89 | + |
| 90 | +resource "oci_core_vcn" "test_vcn" { |
| 91 | +cidr_block = "10.0.0.0/16" |
| 92 | +compartment_id = "${var.compartment_id}" |
| 93 | +lifecycle { |
| 94 | +ignore_changes = ["defined_tags"] |
| 95 | +} |
| 96 | +} |
0 commit comments