File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ module "node_pools" {
215215 orchestrator_version = var. kubernetes_version
216216 enable_host_encryption = var. aks_cluster_enable_host_encryption
217217 tags = var. tags
218+ linux_os_config = each. value . linux_os_config
218219}
219220
220221# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server
Original file line number Diff line number Diff line change @@ -32,6 +32,12 @@ resource "azurerm_kubernetes_cluster_node_pool" "autoscale_node_pool" {
3232 lifecycle {
3333 ignore_changes = [node_count ]
3434 }
35+
36+ linux_os_config {
37+ sysctl_config {
38+ vm_max_map_count = try (var. linux_os_config . sysctl_config . vm_max_map_count ,null )
39+ }
40+ }
3541}
3642
3743resource "azurerm_kubernetes_cluster_node_pool" "static_node_pool" {
@@ -57,4 +63,10 @@ resource "azurerm_kubernetes_cluster_node_pool" "static_node_pool" {
5763 node_taints = var. node_taints
5864 orchestrator_version = var. orchestrator_version
5965 tags = var. tags
66+
67+ linux_os_config {
68+ sysctl_config {
69+ vm_max_map_count = try (var. linux_os_config . sysctl_config . vm_max_map_count ,null )
70+ }
71+ }
6072}
Original file line number Diff line number Diff line change @@ -136,3 +136,13 @@ variable "proximity_placement_group_id" {
136136# type = number
137137# default = -1
138138# }
139+
140+ variable "linux_os_config" {
141+ description = " Specifications of linux os config. Changing this forces a new resource to be created."
142+ type = object ({
143+ sysctl_config = optional (object ({
144+ vm_max_map_count = optional (number )
145+ }))
146+ })
147+ default = {}
148+ }
Original file line number Diff line number Diff line change @@ -568,6 +568,11 @@ variable "node_pools" {
568568 max_pods = string
569569 node_taints = list (string )
570570 node_labels = map (string )
571+ linux_os_config = optional (object ({
572+ sysctl_config = optional (object ({
573+ vm_max_map_count = optional (number )
574+ }))
575+ }))
571576 }))
572577
573578 default = {
You can’t perform that action at this time.
0 commit comments