Azure / ALZ-PowerShell-Module

The Azure Landing Zones Accelerators PowerShell module
https://www.powershellgallery.com/packages/ALZ/
MIT License
72 stars 36 forks source link

Bug: Generated variables' values in terraform.tfvars.json should be in order as variables.tf defined. #206

Closed VeronicaSea closed 1 month ago

VeronicaSea commented 1 month ago

Is there an existing issue for this?

Infrastrcuture as Code Type? (Required)

terraform

Module Versions (Required)

ALZ PowerShell Module: 3.1.2 Accelerator Bootstrap Modules: 3.1.3 Terraform Starter Modules: local Bicep Starter Modules: x.x.x

Input arguments of the ALZ-PowerShell-Module (Optional)

The terraform.tfvars.json is not in order as variables.tf defined. For example:

Deploy-Accelerator -bootstrapRelease "3.1.3" -inputs "inputs.yaml" -starterModuleOverrideFolderPath ".\templates"

Debug Output/Panic Output (Optional)

{
  "subscription_id_identity": "",
  "landing_zone_management_group_children": {},
  "allowed_locations": [
    "eastus"
  ],
  "apply_alz_archetypes_via_architecture_definition_template": "true",
  "subscription_id_management": "",
  "policy_exemptions": {},
  "architecture_definition_template_path": "",
  "subscription_id_connectivity": "",
  "automation_account_name": "",
  "default_postfix": "",
  "policy_assignment_enforcement_mode": "Default",
  "deploy_log_analytics_workspace": "true",
  "customer_policy_sets": {},
  "private_dns_resource_group_id": "",
  "ms_defender_for_cloud_email_security_contact": "security_contact@replace_me.com",
  "architecture_definition_override_path": "",
  "allowed_locations_for_confidential_computing": [
    "eastus"
  ],
  "enable_firewall": "true",
  "log_analytics_workspace_id": "",
  "vpn_gateway_config": {
    "name": "noconfigVpn"
  },
  "default_prefix": "mcfs",
  "bastion_outbound_ssh_rdp_ports": [
    "22",
    "3389"
  ],
  "hub_network_address_prefix": "",
  "default_location": "eastus",
  "tags": {},
  "deploy_bastion": "true",
  "log_analytics_workspace_retention_in_days": "365",
  "custom_subnets": {},
  "deploy_ddos_protection": "true",
  "subscription_billing_scope": "",
  "az_firewall_policies_enabled": "true",
  "deploy_hub_network": "true",
  "policy_effect": "Deny",
  "customer": "Country/Region",
  "ddos_protection_resource_id": "",
  "use_premium_firewall": "true",
  "express_route_gateway_config": {
    "name": "noconfigEr"
  },
  "root_parent_management_group_id": ""
}

Expected Behaviour (Required)

Expected generated variables' values in terraform.tfvars.json in order as variables.tf defined.

Actual Behaviour (Required)

Generated variables' values in terraform.tfvars.json in random order.

Steps to Reproduce (Optional)

No response

Important Factoids (Optional)

No response

References (Optional)

No response

jaredfholgate commented 1 month ago

In the v4 release we have ordered these alphabetically to make it easier to read them. We have no plans to order them by the variables files, so closing this issue.