│ 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.
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.git clone --recursive https://github.com/Azure/az-hop.git
./toolset/scripts/install.sh
cp config.tpl.yml config.yml
az login
./build.sh -a plan
I fixed by checking length() and using a default of "_". PR available.