@@ -31,28 +31,30 @@ resource "azurerm_user_assigned_identity" "test" {
3131}
3232
3333module "aks" {
34- source = " ../.."
35- prefix = " prefix-${ random_id . prefix . hex } "
36- resource_group_name = azurerm_resource_group. main . name
37- client_id = var. client_id
38- client_secret = var. client_secret
39- network_plugin = " azure"
40- vnet_subnet_id = azurerm_subnet. test . id
41- os_disk_size_gb = 60
42- enable_http_application_routing = true
43- enable_azure_policy = true
44- enable_host_encryption = true
45- enable_log_analytics_workspace = true
46- sku_tier = " Paid"
47- private_cluster_enabled = true
48- enable_auto_scaling = true
49- agents_min_count = 1
50- agents_max_count = 2
51- agents_count = null
52- agents_max_pods = 100
53- agents_pool_name = " testnodepool"
54- agents_availability_zones = [" 1" , " 2" ]
55- agents_type = " VirtualMachineScaleSets"
34+ source = " ../.."
35+ prefix = " prefix-${ random_id . prefix . hex } "
36+ resource_group_name = azurerm_resource_group. main . name
37+ client_id = var. client_id
38+ client_secret = var. client_secret
39+ network_plugin = " azure"
40+ vnet_subnet_id = azurerm_subnet. test . id
41+ os_disk_size_gb = 60
42+ enable_http_application_routing = true
43+ enable_azure_policy = true
44+ enable_host_encryption = true
45+ enable_role_based_access_control = true
46+ rbac_aad_managed = true
47+ enable_log_analytics_workspace = true
48+ sku_tier = " Paid"
49+ private_cluster_enabled = true
50+ enable_auto_scaling = true
51+ agents_min_count = 1
52+ agents_max_count = 2
53+ agents_count = null
54+ agents_max_pods = 100
55+ agents_pool_name = " testnodepool"
56+ agents_availability_zones = [" 1" , " 2" ]
57+ agents_type = " VirtualMachineScaleSets"
5658
5759 agents_labels = {
5860 " node1" : " label1"
@@ -75,20 +77,24 @@ module "aks" {
7577}
7678
7779module "aks_without_monitor" {
78- source = " ../.."
79- prefix = " prefix2-${ random_id . prefix . hex } "
80- resource_group_name = azurerm_resource_group. main . name
80+ source = " ../.."
81+ prefix = " prefix2-${ random_id . prefix . hex } "
82+ resource_group_name = azurerm_resource_group. main . name
83+ enable_role_based_access_control = true
84+ rbac_aad_managed = true
8185 # checkov:skip=CKV_AZURE_4:The logging is turn off for demo purpose. DO NOT DO THIS IN PRODUCTION ENVIRONMENT!
82- enable_log_analytics_workspace = false
83- net_profile_pod_cidr = " 10.1.0.0/16"
84- depends_on = [azurerm_resource_group . main ]
86+ enable_log_analytics_workspace = false
87+ net_profile_pod_cidr = " 10.1.0.0/16"
88+ depends_on = [azurerm_resource_group . main ]
8589}
8690
8791module "aks_cluster_name" {
8892 source = " ../.."
8993 cluster_name = " test-cluster"
9094 prefix = " prefix"
9195 resource_group_name = azurerm_resource_group. main . name
96+ enable_role_based_access_control = true
97+ rbac_aad_managed = true
9298 enable_log_analytics_workspace = true
9399 # Not necessary, just for demo purpose.
94100 admin_username = " azureuser"
0 commit comments