Skip to content

Commit 2387f67

Browse files
committed
feat: Adapt code to be compatible with 3.x.x version of azurerm provider
1 parent 91001fd commit 2387f67

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

main.tf

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,20 @@ resource "azurerm_kubernetes_cluster" "k8s" {
3636
os_disk_size_gb = var.node_storage
3737
vnet_subnet_id = var.subnet_id
3838
max_pods = var.max_pods
39-
availability_zones = var.availability_zones
4039
orchestrator_version = var.default_node_pool_k8s_version
40+
zones = var.availability_zones
4141
}
4242

4343
service_principal {
4444
client_id = var.client_id
4545
client_secret = var.client_secret
4646
}
4747

48-
role_based_access_control {
49-
enabled = var.rbac_enabled
50-
azure_active_directory {
51-
managed = true
52-
admin_group_object_ids = var.rbac_managed_admin_groups
53-
azure_rbac_enabled = var.rbac_enabled
54-
}
48+
role_based_access_control_enabled = var.rbac_enabled
49+
azure_active_directory_role_based_access_control {
50+
managed = true
51+
admin_group_object_ids = var.rbac_managed_admin_groups
52+
azure_rbac_enabled = var.rbac_enabled
5553
}
5654

5755
network_profile {
@@ -90,7 +88,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "additional" {
9088
orchestrator_version = each.value.k8s_version
9189
mode = each.value.mode
9290
node_taints = each.value.taints
93-
availability_zones = each.value.availability_zones
91+
zones = each.value.availability_zones
9492
}
9593

9694
resource "azurerm_public_ip" "public-ip-outbound" {

0 commit comments

Comments
 (0)