I recently created a repo based on the AVM Terraform template and found validation errors:
C:\git\terraform-arurerm-avm-res-compute-virtualmachinescaleset>terraform validate
╷
│ Error: Reference to undeclared resource
│
│ on locals.telemetry.tf line 13, in locals:
│ 13: telem_random_hex = can(random_id.telem[0].hex) ? random_id.telem[0].hex : ""
│
│ A managed resource "random_id" "telem" has not been declared in the root module.
╵
╷
│ Error: Reference to undeclared resource
│
│ on locals.telemetry.tf line 13, in locals:
│ 13: telem_random_hex = can(random_id.telem[0].hex) ? random_id.telem[0].hex : ""
│
│ A managed resource "random_id" "telem" has not been declared in the root module.
╵
╷
│ Error: Reference to undeclared local value
│
│ on main.telemetry.tf line 2, in resource "random_id" "telemetry":
│ 2: count = local.enable_telemetry ? 1 : 0
│
│ A local value with the name "enable_telemetry" has not been declared.
After resolving the above errors encountered this error:
C:\git\terraform-azurerm-avm-ptn-loadbalvmss>terraform validate
╷
│ Error: Unsupported argument
│
│ on main.telemetry.tf line 13, in resource "azurerm_resource_group_template_deployment" "telemetry":
│ 13: location = var.location
│
│ An argument named "location" is not expected here.
I recently created a repo based on the AVM Terraform template and found validation errors:
After resolving the above errors encountered this error: