Skip to content

Commit 283a366

Browse files
Add extra check for DNS and multi MT
1 parent 070209b commit 283a366

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ locals {
2626
// subnet_id = var.use_existing_vcn ? var.private_subnet_id : element(concat(oci_core_subnet.private-subnet.*.id, [""]), 0)
2727
subnet_id = var.private_deployment ? var.use_existing_vcn ? var.private_subnet_id : element(concat(oci_core_subnet.private-subnet.*.id, [""]), 1) : var.use_existing_vcn ? var.private_subnet_id : element(concat(oci_core_subnet.private-subnet.*.id, [""]), 0)
2828

29-
nfs_source_IP = var.create_fss ? oci_dns_rrset.fss-dns-round-robin.domain : var.nfs_source_IP
29+
nfs_source_IP = var.create_fss ? oci_dns_rrset.fss-dns-round-robin[0].domain : var.nfs_source_IP
3030
nfs_list_of_mount_target_IPs = var.create_fss ? "[\"${join("\",\"",oci_file_storage_mount_target.FSSMountTarget.*.ip_address)}\"]" : var.nfs_source_IP
3131

3232
// subnet id derived either from created subnet or existing if specified

network.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ resource "oci_dns_rrset" "rrset-cluster-network-SLURM" {
227227
}
228228

229229
resource "oci_dns_rrset" "fss-dns-round-robin" {
230+
count = var.create_fss && var.dns_entries ? 1 : 0
230231
zone_name_or_id = data.oci_dns_zones.dns_zones.zones[0].id
231232
domain = "fss-${var.hostname_convention}.${local.zone_name}"
232233
rtype = "A"

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ variable "create_fss" {
469469
type = bool
470470
}
471471
variable "mount_target_count" {
472-
default = "1"
473-
type = string
472+
default = 1
473+
type = number
474474
}
475475
variable "fss_compartment" {
476476
default = ""

0 commit comments

Comments
 (0)