Skip to content

Bug: PATH update fails for terraform.exe due to OS variable not initialized #484

@jaredfholgate

Description

@jaredfholgate

Is there an existing issue for this?

  • I have searched the existing issues

Infrastructure as Code Type? (Required)

terraform

PowerShell Module Version (Optional)

No response

Bootstrap Module Version (Optional)

No response

Starter Module? (Required)

terraform - platform_landing_zone

Starter Module Version (Optional)

No response

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

No response

Debug Output/Panic Output (Optional)

Expected Behaviour (Required)

When running scripts or pipelines, the OS variable should be set before any logic that updates PATH for terraform.exe. PATH construction should use correct platform-specific separator: ':' for Linux, ';' for Windows. This prevents failures to locate terraform.exe on Windows environments.

Actual Behaviour (Required)

In Get-TerraformTool.ps1 and pipeline templates, '$os' is often accessed before initialization. This causes the PATH to use the Linux separator ':' on Windows, resulting in 'terraform.exe location cannot be found' errors.

Steps to Reproduce (Optional)

  1. Run ALZ-PowerShell-Module bootstrap on Windows.
  2. Observe output/logs: PATH for terraform.exe set incorrectly.
  3. terraform.exe not found due to OS variable not set and incorrect separator.

Important Factoids (Optional)

No response

References (Optional)

See parent issue: @Azure/ALZ-PowerShell-Module/issues/482
Related templates and scripts: Get-TerraformTool.ps1, terraform-installer.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions