Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
"one" -> 1 in dynamic loops, to keep code coherent
Browse files Browse the repository at this point in the history
  • Loading branch information
FoSix committed Dec 8, 2023
1 parent 54dc635 commit e32a009
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/dedicated_vmseries_and_autoscale/example.tfvars
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions modules/vmss/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e32a009

Please sign in to comment.