File tree Expand file tree Collapse file tree 2 files changed +24
-10
lines changed
Expand file tree Collapse file tree 2 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 1- # Copyright 2017, 2021 Oracle Corporation and/or affiliates.
1+ # Copyright 2017, 2023 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
44locals {
@@ -145,14 +145,6 @@ locals {
145145 source_type = " CIDR_BLOCK" ,
146146 stateless = false
147147 },
148- {
149- description = " Allow operator host access to control plane. Required for kubectl/helm."
150- protocol = local.tcp_protocol,
151- port = 6443 ,
152- source = local.operator_subnet,
153- source_type = " CIDR_BLOCK" ,
154- stateless = false
155- },
156148 ])
157149
158150 # Network Security Group ingress rules for control plane subnet (Only VCN-Native Pod networking)
Original file line number Diff line number Diff line change 1- # Copyright 2017, 2021 , Oracle Corporation and/or affiliates.
1+ # Copyright 2017, 2023 , 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# control plane nsg and rules
@@ -85,6 +85,28 @@ resource "oci_core_network_security_group_security_rule" "cp_ingress" {
8585
8686}
8787
88+ # separate the operator rule for users who do not wish to use the operator
89+ resource "oci_core_network_security_group_security_rule" "cp_ingress_operator" {
90+ network_security_group_id = oci_core_network_security_group. cp . id
91+ description = " Allow operator host access to control plane. Required for kubectl/helm."
92+ direction = " INGRESS"
93+ protocol = local. tcp_protocol
94+ source = local. operator_subnet
95+ source_type = " CIDR_BLOCK"
96+
97+ stateless = false
98+
99+ tcp_options {
100+ destination_port_range {
101+ min = 6443
102+ max = 6443
103+ }
104+ }
105+
106+ count = var. create_operator ? 1 : 0
107+
108+ }
109+
88110resource "oci_core_network_security_group_security_rule" "cp_ingress_additional_cidrs" {
89111 network_security_group_id = oci_core_network_security_group. cp . id
90112 description = " Allow additional CIDR block access to control plane. Required for kubectl/helm."
You can’t perform that action at this time.
0 commit comments