From e32a009f60e645502da236a65eb60c54b8dba661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawl=C4=99ga?= Date: Fri, 8 Dec 2023 12:39:52 +0100 Subject: [PATCH] "one" -> 1 in dynamic loops, to keep code coherent --- examples/dedicated_vmseries_and_autoscale/example.tfvars | 2 +- modules/vmss/main.tf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/dedicated_vmseries_and_autoscale/example.tfvars b/examples/dedicated_vmseries_and_autoscale/example.tfvars index 0f5b0d14..cf9a54a6 100644 --- a/examples/dedicated_vmseries_and_autoscale/example.tfvars +++ b/examples/dedicated_vmseries_and_autoscale/example.tfvars @@ -1,7 +1,7 @@ # --- GENERAL --- # location = "North Europe" resource_group_name = "autoscale-dedicated" -name_prefix = "fosix-" +name_prefix = "example-" tags = { "CreatedBy" = "Palo Alto Networks" "CreatedWith" = "Terraform" diff --git a/modules/vmss/main.tf b/modules/vmss/main.tf index 8f0b9396..0d8d2b69 100644 --- a/modules/vmss/main.tf +++ b/modules/vmss/main.tf @@ -22,7 +22,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "this" { disable_password_authentication = var.authentication.disable_password_authentication dynamic "admin_ssh_key" { - for_each = { for v in var.authentication.ssh_keys : v => v } + for_each = { for k, v in var.authentication.ssh_keys : k => v } content { username = var.authentication.username public_key = admin_ssh_key.value @@ -40,7 +40,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "this" { provision_vm_agent = false dynamic "plan" { - for_each = var.image.enable_marketplace_plan ? ["one"] : [] + for_each = var.image.enable_marketplace_plan ? [1] : [] content { name = var.image.sku publisher = var.image.publisher @@ -92,7 +92,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "this" { application_gateway_backend_address_pool_ids = nic.value.appgw_backend_pool_ids dynamic "public_ip_address" { - for_each = nic.value.create_public_ip ? ["one"] : [] + for_each = nic.value.create_public_ip ? [1] : [] iterator = pip content {