Skip to content

Bug: Azure Landing Zones Continuous Delivery failing on Plan Task (Call to function "templatestring" failed) #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
wgyger opened this issue Mar 19, 2025 · 5 comments
Assignees
Labels
Type: Feature Request ➕ New feature or request

Comments

@wgyger
Copy link

wgyger commented Mar 19, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Infrastructure as Code Type? (Required)

terraform

PowerShell Module Version (Optional)

latest

Bootstrap Module Version (Optional)

v4.3.4

Starter Module? (Required)

terraform - platform_landing_zone

Starter Module Version (Optional)

v5.5.0

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

Using Defaults

Debug Output/Panic Output (Optional)

https://gist.github.com/wgyger/2d28829f24d62aa1f4e42adaaa52c508

Expected Behaviour (Required)

After running accelerator bootstrap, expected to be able to deploy Azure DevOps Pipeline without errors (no changes being made to the repository code that was produced by the bootstrap process)

Actual Behaviour (Required)

Ran the "02 Azure Landing Zones Continuous Delivery" pipeline in Azure DevOps and received the attached error during the Plan Job (Terraform Plan for apply task)

Steps to Reproduce (Optional)

Run Terraform Accelerator bootstrap, generate ADO project and Azure supporting infrastructure. Verify no errors in bootstrap process. Run "02 Azure Landing Zones Continuous Delivery" pipeline. Observe error in the Plan job.

Important Factoids (Optional)

No response

References (Optional)

No response

@wgyger wgyger added Needs: Triage 🔍 Needs triaging by the team Type: Bug 🪲 Something isn't working labels Mar 19, 2025
@wgyger
Copy link
Author

wgyger commented Mar 19, 2025

As I've been trying to get this to work, I cleared everything and started over, using the "Single-Region Hub and Spoke Virtual Network with Azure Firewall" Platform Landing Zone Configuration File (rather than the "Multi-Region Hub and Spoke Virtual Network with Network Virtual Appliance (NVA)") and I was able to run the bootstrap and deploy the ALZ end to end. This is not an ideal solution as we'll be using Palo Alto appliances in our deployment. Please let me know if I'm missing something or if there are known issues in that specific scenario file. Thank you.

@jaredfholgate
Copy link
Member

Ok. So if I understand, you wish to use the NVA option with a single region? You supplied a single starter_location in the array of the bootstrap configuration file, but didn't remove the secondary location settings from the platform landing zone configuration file.

This is the error I would expect to see in that scenario, since you are telling the module you want to deploy 2 regions, but you are only supplying a single region in the config.

We can add some better error handling for this and this related issue may also help: #306

I think your real ask here is for a new scenario to added with an associated example configuration file for 'Single-Region Hub and Spoke Virtual Network with Network Virtual Appliance (NVA)'. I think this is something we can do.

In the short term, to remove the secondary region, you can follow the opposite steps to this option: https://azure.github.io/Azure-Landing-Zones/accelerator/startermodules/terraform-platform-landing-zone/options/regions/. So instead of adding a region, remove the secondary region from the NVA tfvars file.

@jaredfholgate jaredfholgate self-assigned this Mar 20, 2025
@jaredfholgate jaredfholgate added Type: Feature Request ➕ New feature or request and removed Needs: Triage 🔍 Needs triaging by the team Type: Bug 🪲 Something isn't working labels Mar 20, 2025
jaredfholgate added a commit to Azure/alz-terraform-accelerator that referenced this issue Mar 20, 2025
<!-- Thank you for submitting a Pull Request. Please fill out the
template below.-->
## Overview/Summary

This PR adds validation for starter locations to match the number of
connectivity regions.

It also adds example config for single region NVA sceanrios

## This PR fixes/adds/changes/removes

1. Azure/ALZ-PowerShell-Module#326

### Breaking Changes

None

## Testing Evidence

Please provide any testing evidence to show that your Pull Request
works/fixes as described and planned (include screenshots, if
appropriate).

## As part of this Pull Request I have

- [x] Checked for duplicate [Pull
Requests](https://github.com/Azure/alz-terraform-accelerator/pulls)
- [x] Associated it with relevant
[issues](https://github.com/Azure/alz-terraform-accelerator/issues), for
tracking and closure.
- [x] Ensured my code/branch is up-to-date with the latest changes in
the `main`
[branch](https://github.com/Azure/alz-terraform-accelerator/tree/main)
- [x] Performed testing and provided evidence.
- [x] Updated relevant and associated documentation.

---------

Co-authored-by: Copilot <[email protected]>
@wgyger
Copy link
Author

wgyger commented Mar 20, 2025 via email

@jaredfholgate
Copy link
Member

Thank you for the quick response. What you say makes sense and I now see why I was getting the error. I see a configuration template in the documentation that will accommodate the single region NVA scenario. I'm not sure if I missed this or if it was recently added but I'll give that one a try and report back. Thanks again!

I just added today based on this and other requests.

@wgyger
Copy link
Author

wgyger commented Mar 20, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Request ➕ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants