Skip to content

Commit 95dbbc2

Browse files
authored
fix: Remove label_prefix from dns_label in subnets (#620)
Signed-off-by: Devon Crouse <[email protected]> Signed-off-by: Devon Crouse <[email protected]>
1 parent ad76dd9 commit 95dbbc2

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

CHANGELOG.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ All notable changes to this project are documented in this file.
77

88
The format is based on {uri-changelog}[Keep a Changelog].
99

10-
== 4.2.18 (not released)
10+
== 4.3.0 (not released)
1111
=== Changes
12-
* fix: Bastion & FSS support for disabled VCN DNS, min TF version -> 1.1 by @devoncrouse
12+
* fix: Remove label_prefix from dns_label in subnets by @devoncrouse
13+
14+
== 4.2.18
15+
=== Changes
16+
* fix: Bastion & FSS support for disabled VCN DNS, min TF version -> 1.1 by @devoncrouse in #617
1317

1418
== 4.2.17
1519
=== Changes

modules/network/subnets.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Copyright 2017, 2021 Oracle Corporation and/or affiliates.
1+
# Copyright 2017, 2022 Oracle Corporation and/or affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33

44
resource "oci_core_subnet" "cp" {
55
cidr_block = local.cp_subnet
66
compartment_id = var.compartment_id
77
display_name = var.label_prefix == "none" ? "control-plane" : "${var.label_prefix}-control-plane"
8-
dns_label = var.assign_dns ? var.label_prefix == "none" ? "cp" : "${var.label_prefix}cp" : null
8+
dns_label = var.assign_dns ? "cp" : null
99
prohibit_public_ip_on_vnic = var.control_plane_type == "private" ? true : false
1010
route_table_id = var.control_plane_type == "private" ? var.nat_route_id : var.ig_route_id
1111
security_list_ids = [oci_core_security_list.control_plane_seclist.id]
@@ -20,7 +20,7 @@ resource "oci_core_subnet" "workers" {
2020
cidr_block = local.workers_subnet
2121
compartment_id = var.compartment_id
2222
display_name = var.label_prefix == "none" ? "workers" : "${var.label_prefix}-workers"
23-
dns_label = var.assign_dns ? var.label_prefix == "none" ? "workers" : "${var.label_prefix}wo" : null
23+
dns_label = var.assign_dns ? "wo" : null
2424
prohibit_public_ip_on_vnic = var.worker_type == "private" ? true : false
2525
route_table_id = var.worker_type == "private" ? var.nat_route_id : var.ig_route_id
2626
vcn_id = var.vcn_id
@@ -34,7 +34,7 @@ resource "oci_core_subnet" "pods" {
3434
cidr_block = local.pods_subnet
3535
compartment_id = var.compartment_id
3636
display_name = var.label_prefix == "none" ? "pods" : "${var.label_prefix}-pods"
37-
dns_label = var.assign_dns ? var.label_prefix == "none" ? "pods" : "${var.label_prefix}po" : null
37+
dns_label = var.assign_dns ? "po" : null
3838
prohibit_public_ip_on_vnic = true
3939
route_table_id = var.nat_route_id
4040
vcn_id = var.vcn_id
@@ -50,7 +50,7 @@ resource "oci_core_subnet" "int_lb" {
5050
cidr_block = local.int_lb_subnet
5151
compartment_id = var.compartment_id
5252
display_name = var.label_prefix == "none" ? "int-lb" : "${var.label_prefix}-int-lb"
53-
dns_label = var.assign_dns ? var.label_prefix == "none" ? "intlb" : "${var.label_prefix}ilb" : null
53+
dns_label = var.assign_dns ? "ilb" : null
5454
prohibit_public_ip_on_vnic = true
5555
route_table_id = var.nat_route_id
5656
vcn_id = var.vcn_id
@@ -66,7 +66,7 @@ resource "oci_core_subnet" "pub_lb" {
6666
cidr_block = local.pub_lb_subnet
6767
compartment_id = var.compartment_id
6868
display_name = var.label_prefix == "none" ? "pub-lb" : "${var.label_prefix}-pub-lb"
69-
dns_label = var.assign_dns ? var.label_prefix == "none" ? "publb" : "${var.label_prefix}plb" : null
69+
dns_label = var.assign_dns ? "plb" : null
7070
prohibit_public_ip_on_vnic = false
7171
route_table_id = var.ig_route_id
7272
vcn_id = var.vcn_id

0 commit comments

Comments
 (0)