Azure / caf-terraform-landingzones

This solution, offered by the Open-Source community, will no longer receive contributions from Microsoft. Customers are encouraged to transition to Microsoft Azure Verified Modules for continued support and updates from Microsoft. Please note, this repository is scheduled for decommissioning and will be removed on July 1, 2025.
https://github.com/aztfmod/caf-terraform-landingzones
MIT License
761 stars 666 forks source link

Fails creating definition template [bug] #409

Open Drejmester opened 2 years ago

Drejmester commented 2 years ago

Describe the bug Only works with default values. Will not take variables when running '/tf/caf/landingzones/templates/platform/deploy_platform.sh' in step https://aztfmod.github.io/documentation/docs/azure-landing-zones/landingzones/platform/single%20reuse/elsz-single-reuse/#create-the-definition-template-on-your-work-environment

fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'list object' has no attribute 'items'\n\nThe error appears to be in '/tf/caf/landingzones/templates/ansible/walk-through.yaml': line 35, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- set_fact:\n ^ here\n"}

To Reproduce Steps to reproduce the behavior:

  1. setup Github organization
  2. run folder in container
  3. clone terraform az ladning zone repo: https://github.com/Azure/caf-terraform-landingzones.git
  4. log into Azure CLI
  5. run '/tf/caf/landingzones/templates/platform/deploy_platform.sh'
  6. enter any values

Expected behavior a new definition configuration of your environment

Screenshots If applicable, add screenshots to help explain your problem.

Configuration (please complete the following information):

edjwhho commented 1 year ago

experiencing same issue

sebastienrichoz commented 1 year ago

When running '/tf/caf/landingzones/templates/platform/deploy_platform.sh', be aware to not set any value as a list.

For example, this is wrong: [{'region1': 'australiaeast', 'region2': 'australiacentral'}] and should be: {'region1': 'australiaeast', 'region2': 'australiacentral'} (remove the brackets [])