Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ThilinaManamgoda committed Jan 19, 2024
1 parent 972c0cc commit 92ade33
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/azurerm/VMSS-Linux/local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# You may not alter or remove any copyright or other notice from copies of this content.
#
# --------------------------------------------------------------------------------------

locals {
image_set = var.source_image_id != null ? true : false
reference_set = var.source_image_reference != null ? true : false
Expand Down
1 change: 1 addition & 0 deletions modules/azurerm/VMSS-Linux/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# You may not alter or remove any copyright or other notice from copies of this content.
#
# --------------------------------------------------------------------------------------

output "vmss_resource_id" {
depends_on = [azurerm_linux_virtual_machine_scale_set.linux_virtual_machine_scale_set]
value = azurerm_linux_virtual_machine_scale_set.linux_virtual_machine_scale_set.id
Expand Down
1 change: 1 addition & 0 deletions modules/azurerm/VMSS-Linux/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# You may not alter or remove any copyright or other notice from copies of this content.
#
# --------------------------------------------------------------------------------------

variable "name" {
description = "VMSS name."
type = string
Expand Down
3 changes: 2 additions & 1 deletion modules/azurerm/VMSS-Linux/vmss.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# You may not alter or remove any copyright or other notice from copies of this content.
#
# --------------------------------------------------------------------------------------

resource "azurerm_linux_virtual_machine_scale_set" "linux_virtual_machine_scale_set" {
name = join("-", ["vmss", var.name])
resource_group_name = var.resource_group_name
Expand All @@ -27,6 +28,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "linux_virtual_machine_scale_
instances
]
}

admin_ssh_key {
username = var.admin_ssh_username
public_key = file(var.admin_ssh_public_key_path)
Expand All @@ -44,7 +46,6 @@ resource "azurerm_linux_virtual_machine_scale_set" "linux_virtual_machine_scale_

source_image_id = local.valid_input && local.image_set ? var.source_image_id : null


dynamic "rolling_upgrade_policy" {
for_each = local.rolling_upgrade_enabled ? [var.rolling_upgrade_policy] : []
content {
Expand Down

0 comments on commit 92ade33

Please sign in to comment.