Skip to content

Commit 6df4dda

Browse files
committed
feat: configure azure_rbac_enabled for azure_active_directory_role_based_access_control independent from role_based_access_control_enabled
Documentation was generated with the terraform module tool
1 parent 40ba599 commit 6df4dda

File tree

3 files changed

+48
-8
lines changed

3 files changed

+48
-8
lines changed

README.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@ Type: `string`
124124

125125
The following input variables are optional (have default values):
126126

127+
### ad\_rbac\_enabled
128+
129+
Description: Defines RBAC for block azure\_active\_directory\_role\_based\_access\_control explicitly if set.
130+
Else RBAC for block azure\_active\_directory\_role\_based\_access\_control is set by "rbac\_enabled"
131+
132+
Type: `bool`
133+
134+
Default: `null`
135+
127136
### api\_server\_ip\_ranges
128137

129138
Description: The IP ranges to allow for incoming traffic to the server nodes. To disable the limitation, set an empty list as value (default).
@@ -132,7 +141,7 @@ Type: `list(string)`
132141

133142
Default: `[]`
134143

135-
### auto\_scaling\_enable
144+
### auto\_scaling\_enabled
136145

137146
Description: Enable auto-scaling of node pool
138147

@@ -156,7 +165,7 @@ Type: `string`
156165

157166
Default: `"1"`
158167

159-
### automatic\_channel\_upgrade
168+
### automatic\_upgrade\_channel
160169

161170
Description: Values:
162171
none, patch, stable, rapid, node-image
@@ -192,15 +201,17 @@ Default: `"default"`
192201

193202
### default\_node\_pool\_upgrade\_settings\_enabled
194203

195-
Description: default upgrade settings is added to default node pool
204+
Description: Values:
205+
false, true
196206

197-
Type: `boolean`
207+
Type: `bool`
198208

199209
Default: `false`
200210

201211
### default\_node\_pool\_upgrade\_settings\_max\_surge
202212

203-
Description: max surge of upgrade settings for default node pool
213+
Description: Example: "10%"
214+
see https://learn.microsoft.com/en-us/azure/aks/upgrade-aks-cluster?tabs=azure-cli#customize-node-surge-upgrade
204215

205216
Type: `string`
206217

@@ -222,6 +233,22 @@ Type: `number`
222233

223234
Default: `5`
224235

236+
### image\_cleaner\_enabled
237+
238+
Description: Azure default settings
239+
240+
Type: `bool`
241+
242+
Default: `false`
243+
244+
### image\_cleaner\_interval\_hours
245+
246+
Description: Azure default settings
247+
248+
Type: `number`
249+
250+
Default: `48`
251+
225252
### load\_balancer\_sku
226253

227254
Description: The SKU for the used Load Balancer
@@ -434,6 +461,10 @@ Description: The Kubernetes API host for a kubectl config
434461

435462
Description: The object ID of the service principal of the managed identity of the AKS
436463

464+
### node\_count
465+
466+
Description: n/a
467+
437468
### node\_resource\_group
438469

439470
Description: The resource group the Kubernetes nodes were created in

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
locals {
11-
cluster_name = "${lower(var.project)}${lower(var.stage)}k8s"
11+
cluster_name = "${lower(var.project)}${lower(var.stage)}k8s"
1212
has_automatic_channel_upgrade_maintenance_window = var.automatic_upgrade_channel != "none" ? [
1313
var.automatic_upgrade_channel
1414
] : []
@@ -67,7 +67,7 @@ resource "azurerm_kubernetes_cluster" "k8s" {
6767
dynamic "upgrade_settings" {
6868
for_each = local.has_default_node_pool_upgrade_settings
6969
content {
70-
max_surge = var.default_node_pool_upgrade_settings_max_surge
70+
max_surge = var.default_node_pool_upgrade_settings_max_surge
7171
}
7272
}
7373
}
@@ -86,7 +86,7 @@ resource "azurerm_kubernetes_cluster" "k8s" {
8686
role_based_access_control_enabled = var.rbac_enabled
8787
azure_active_directory_role_based_access_control {
8888
admin_group_object_ids = var.rbac_managed_admin_groups
89-
azure_rbac_enabled = var.rbac_enabled
89+
azure_rbac_enabled = var.ad_rbac_enabled != null ? var.ad_rbac_enabled : var.rbac_enabled
9090
}
9191

9292
network_profile {

vars.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ variable "rbac_enabled" {
6262
default = true
6363
}
6464

65+
variable "ad_rbac_enabled" {
66+
type = bool
67+
description = <<-EOF
68+
Defines RBAC for block azure_active_directory_role_based_access_control explicitly if set.
69+
Else RBAC for block azure_active_directory_role_based_access_control is set by "rbac_enabled"
70+
EOF
71+
default = null
72+
}
73+
6574
variable "rbac_managed_admin_groups" {
6675
type = list(string)
6776
description = "The group IDs that have admin access to the cluster. Have to be specified if rbac_enabled is true"

0 commit comments

Comments
 (0)