Azure / az-hop

The Azure HPC On-Demand Platform provides an HPC Cluster Ready solution
https://azure.github.io/az-hop/
MIT License
65 stars 54 forks source link

Default config, tf Error: Invalid index with private dns on build #1896

Closed urgent closed 6 months ago

urgent commented 6 months ago

Version

az-hop: 1.0.41

Terraform v1.7.5 on linux_amd64

In what area(s)?

/area configuration

Expected Behavior

./build.sh -a plan executes successfully.

Actual Behavior

Terraform errors with private DNS:

│ Error: Invalid index │ │ on private_dns.tf line 22, in resource "azurerm_private_dns_a_record" "ad": │ 22: zone_name = azurerm_private_dns_zone.azhop_private_dns[0].name │ ├──────────────── │ │ azurerm_private_dns_zone.azhop_private_dns is empty tuple │ │ The given key does not identify an element in this collection value: the │ collection has no elements. ╵

Steps to Reproduce the Problem

-b v1.0.41 errors with mysql admin empty string in terraform. The main branch has non-empty strings.

  1. git clone --recursive https://github.com/Azure/az-hop.git
  2. ./toolset/scripts/install.sh
  3. cp config.tpl.yml config.yml
  4. edit config.yml to set the region
  5. az login
  6. ./build.sh -a plan

I fixed by checking length() and using a default of "_". PR available.

xpillons commented 6 months ago

Thanks for reporting, I will have a look

urgent commented 6 months ago

I just needed to enable private dns.