-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maintenance window support #133
Changes from 3 commits
98f6514
982e74f
419382a
5dcb985
1cbbd42
b1fafa1
185bcb9
ef13798
e26abe3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,6 +84,24 @@ resource "azurerm_kubernetes_cluster" "main" { | |
} | ||
} | ||
|
||
maintenance_window { | ||
dynamic "allowed" { | ||
for_each = var.enable_maintenance_window == true ? var.maintenance_allowed : [] | ||
content { | ||
day = allowed.value.day | ||
hours = allowed.value.hours | ||
} | ||
} | ||
|
||
dynamic "not_allowed" { | ||
for_each = var.enable_maintenance_window == true ? var.maintenance_not_allowed : [] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this line too: for_each = var.enable_maintenance_window ? var.maintenance_not_allowed : [] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
content { | ||
start = not_allowed.value.start | ||
end = not_allowed.value.end | ||
} | ||
} | ||
} | ||
|
||
addon_profile { | ||
http_application_routing { | ||
enabled = var.enable_http_application_routing | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -289,3 +289,27 @@ variable "enable_host_encryption" { | |
type = bool | ||
default = false | ||
} | ||
|
||
variable "enable_maintenance_window" { | ||
description = "Enable maintenance for AKS cluster" | ||
type = bool | ||
default = false | ||
} | ||
|
||
variable "maintenance_allowed" { | ||
description = "Days and hours when maintenance is allowed" | ||
type = list(object({ | ||
day = string | ||
hours = list(string) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
})) | ||
default = [] | ||
} | ||
|
||
variable "maintenance_not_allowed" { | ||
description = "Days and hours when maintenance is not allowed" | ||
type = list(object({ | ||
end = string | ||
start = string | ||
})) | ||
default = [] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the following expression be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done