File tree Expand file tree Collapse file tree 3 files changed +33
-18
lines changed Expand file tree Collapse file tree 3 files changed +33
-18
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ The following resources are used by this module:
49
49
50
50
The following input variables are required:
51
51
52
+ ### api\_ server\_ ip\_ ranges
53
+
54
+ Description: The IP ranges to allow for incoming traffic to the server nodes. To disable the limitation, set an empty list as value.
55
+
56
+ Type: ` list(string) `
57
+
52
58
### client\_ id
53
59
54
60
Description: Azure client ID to use to manage Azure resources from the cluster, like f.e. load balancers
@@ -91,6 +97,12 @@ Description: Three letter project key
91
97
92
98
Type: ` string `
93
99
100
+ ### rbac\_ managed\_ admin\_ groups
101
+
102
+ Description: The group IDs that have admin access to the cluster. Have to be specified if rbac\_ enabled is true
103
+
104
+ Type: ` list(string) `
105
+
94
106
### resource\_ group
95
107
96
108
Description: Azure Resource Group to use
@@ -225,15 +237,7 @@ Description: Enables RBAC on the cluster. If true, rbac\_managed\_admin\_groups
225
237
226
238
Type: ` bool `
227
239
228
- Default: ` false `
229
-
230
- ### rbac\_ managed\_ admin\_ groups
231
-
232
- Description: The group IDs that have admin access to the cluster. Have to be specified if rbac\_ enabled is true
233
-
234
- Type: ` list(string) `
235
-
236
- Default: ` [] `
240
+ Default: ` true `
237
241
238
242
### sku\_ tier
239
243
Original file line number Diff line number Diff line change @@ -11,14 +11,22 @@ locals {
11
11
cluster_name = " ${ lower (var. project )} ${ lower (var. stage )} k8s"
12
12
}
13
13
14
+ # Log analytics required for OMS Agent result processing - usually other logging solutions are used. Hence the affected tfsec rule is
15
+ # ignored here
16
+ #
17
+ # IP limit for API is not really ignored, since the variable requires to enter something. However one can decide to disable the limitation
18
+ # and it would trigger the tfsec rule. Hence the affected tfsec rule is ignored here
19
+ #
20
+ # tfsec:ignore:azure-container-logging tfsec:ignore:azure-container-limit-authorized-ips
14
21
resource "azurerm_kubernetes_cluster" "k8s" {
15
- name = local. cluster_name
16
- location = var. location
17
- resource_group_name = var. resource_group
18
- tags = var. tags
19
- dns_prefix = var. dns_prefix == " NONE" ? local. cluster_name : var. dns_prefix
20
- sku_tier = var. sku_tier
21
- kubernetes_version = var. kubernetes_version
22
+ name = local. cluster_name
23
+ location = var. location
24
+ resource_group_name = var. resource_group
25
+ tags = var. tags
26
+ dns_prefix = var. dns_prefix == " NONE" ? local. cluster_name : var. dns_prefix
27
+ sku_tier = var. sku_tier
28
+ kubernetes_version = var. kubernetes_version
29
+ api_server_authorized_ip_ranges = var. api_server_ip_ranges
22
30
23
31
default_node_pool {
24
32
name = var. default_node_pool_name
Original file line number Diff line number Diff line change @@ -69,13 +69,12 @@ variable "node_storage" {
69
69
variable "rbac_enabled" {
70
70
type = bool
71
71
description = " Enables RBAC on the cluster. If true, rbac_managed_admin_groups have to be specified."
72
- default = false
72
+ default = true
73
73
}
74
74
75
75
variable "rbac_managed_admin_groups" {
76
76
type = list (string )
77
77
description = " The group IDs that have admin access to the cluster. Have to be specified if rbac_enabled is true"
78
- default = []
79
78
}
80
79
81
80
variable "default_node_pool_name" {
@@ -172,3 +171,7 @@ variable "ssh_public_key" {
172
171
description = " SSH public key to access the kubernetes node with"
173
172
}
174
173
174
+ variable "api_server_ip_ranges" {
175
+ type = list (string )
176
+ description = " The IP ranges to allow for incoming traffic to the server nodes. To disable the limitation, set an empty list as value."
177
+ }
You can’t perform that action at this time.
0 commit comments