Skip to content
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

fix: vmss os update policy #9

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ No modules.
|------|-------------|------|---------|:--------:|
| <a name="input_admin_ssh_key"></a> [admin\_ssh\_key](#input\_admin\_ssh\_key) | Objects to configure ssh key reference for Virtual Machine Scale Sets | <pre>object({<br> username = optional(string, "azureuser")<br> public_key = string<br> })</pre> | <pre>{<br> "public_key": null,<br> "username": null<br>}</pre> | no |
| <a name="input_analytics_workspace_id"></a> [analytics\_workspace\_id](#input\_analytics\_workspace\_id) | Resource ID of Log Analytics Workspace | `string` | `null` | no |
| <a name="input_automatic_os_upgrade_policy"></a> [automatic\_os\_upgrade\_policy](#input\_automatic\_os\_upgrade\_policy) | Configuration options for automatic os upgrade policy | <pre>object({<br> disable_automatic_rollback = optional(bool, false)<br> enable_automatic_os_upgrade = optional(bool, false)<br> })</pre> | `{}` | no |
| <a name="input_data_collection_rule_association_name"></a> [data\_collection\_rule\_association\_name](#input\_data\_collection\_rule\_association\_name) | Data collection rule association name | `string` | `null` | no |
| <a name="input_data_collection_rule_name"></a> [data\_collection\_rule\_name](#input\_data\_collection\_rule\_name) | Data collection rule name | `string` | `null` | no |
| <a name="input_datasource_name"></a> [datasource\_name](#input\_datasource\_name) | Datasource syslog name | `string` | `"datasource-syslog"` | no |
Expand Down
5 changes: 5 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ resource "azurerm_linux_virtual_machine_scale_set" "this" {
}
}

automatic_os_upgrade_policy {
disable_automatic_rollback = var.automatic_os_upgrade_policy.disable_automatic_rollback
enable_automatic_os_upgrade = var.automatic_os_upgrade_policy.enable_automatic_os_upgrade
}

boot_diagnostics {
storage_account_uri = null
}
Expand Down
9 changes: 9 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
sku = optional(string, "Standard_D2_v2")
instances = optional(string, "2")
admin_username = optional(string, "azureuser")
admin_password = optional(string, null)

Check warning on line 63 in variables.tf

View workflow job for this annotation

GitHub Actions / Run security KICS scaner

[HIGH] Passwords And Secrets - Generic Password

Query to find passwords and secrets in infrastructure code.
disable_password_authentication = optional(bool, true)
priority = optional(string, "Regular")
overprovision = optional(bool, false)
Expand Down Expand Up @@ -176,3 +176,12 @@
description = "Version of VMSS extension required for logging"
default = "9.5"
}

variable "automatic_os_upgrade_policy" {
description = "Configuration options for automatic os upgrade policy"
type = object({
disable_automatic_rollback = optional(bool, false)
enable_automatic_os_upgrade = optional(bool, false)
})
default = {}
}
Loading