Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

label_prefix should apply to hostname #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions instances/etcd/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ resource "oci_core_instance" "TFInstanceEtcd" {
availability_domain = "${var.availability_domain}"
compartment_id = "${var.compartment_ocid}"
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
hostname_label = "${var.hostname_label_prefix}-${count.index}"
hostname_label = "${var.label_prefix}${var.hostname_label_prefix}-${count.index}"
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
shape = "${var.shape}"

create_vnic_details {
subnet_id = "${var.subnet_id}"
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
hostname_label = "${var.hostname_label_prefix}-${count.index}"
hostname_label = "${var.label_prefix}${var.hostname_label_prefix}-${count.index}"
assign_public_ip = "${(var.control_plane_subnet_access == "private") ? "false" : "true"}"
private_ip = "${var.assign_private_ip == "true" ? cidrhost(lookup(var.network_cidrs,var.subnet_name), count.index+2) : ""}"
},
Expand All @@ -41,7 +41,7 @@ resource "oci_core_volume" "TFVolumeInstanceEtcd" {
count = "${var.etcd_iscsi_volume_create ? var.count : 0}"
availability_domain = "${var.availability_domain}"
compartment_id = "${var.compartment_ocid}"
display_name = "block-volume-${var.hostname_label_prefix}-${count.index}"
display_name = "block-volume-${var.label_prefix}${var.hostname_label_prefix}-${count.index}"
size_in_gbs = "${var.etcd_iscsi_volume_size}"
}

Expand Down
4 changes: 2 additions & 2 deletions instances/k8smaster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ resource "oci_core_instance" "TFInstanceK8sMaster" {
availability_domain = "${var.availability_domain}"
compartment_id = "${var.compartment_ocid}"
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
hostname_label = "${var.hostname_label_prefix}-${count.index}"
hostname_label = "${var.label_prefix}${var.hostname_label_prefix}-${count.index}"
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
shape = "${var.shape}"

create_vnic_details {
subnet_id = "${var.subnet_id}"
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
hostname_label = "${var.hostname_label_prefix}-${count.index}"
hostname_label = "${var.label_prefix}${var.hostname_label_prefix}-${count.index}"
assign_public_ip = "${(var.control_plane_subnet_access == "private") ? "false" : "true"}"
private_ip = "${var.assign_private_ip == "true" ? cidrhost(lookup(var.network_cidrs,var.subnet_name), count.index+2) : ""}"
}
Expand Down
4 changes: 2 additions & 2 deletions instances/k8sworker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "oci_core_instance" "TFInstanceK8sWorker" {
availability_domain = "${var.availability_domain}"
compartment_id = "${var.compartment_ocid}"
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
hostname_label = "${var.hostname_label_prefix}-${count.index}"
hostname_label = "${var.label_prefix}${var.hostname_label_prefix}-${count.index}"
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
shape = "${var.shape}"
subnet_id = "${var.subnet_id}"
Expand Down Expand Up @@ -52,7 +52,7 @@ resource "oci_core_volume" "TFVolumeK8sWorker" {
count = "${var.worker_iscsi_volume_create ? var.count : 0}"
availability_domain = "${var.availability_domain}"
compartment_id = "${var.compartment_ocid}"
display_name = "block-volume-${var.hostname_label_prefix}-${count.index}"
display_name = "block-volume-${var.label_prefix}${var.hostname_label_prefix}-${count.index}"
size_in_gbs = "${var.worker_iscsi_volume_size}"
}

Expand Down