Azure / terraform-azurerm-naming

MIT License
221 stars 109 forks source link

frontdoor_firewall_policy producing invalid output #87

Open natilik-mikeguy opened 1 year ago

natilik-mikeguy commented 1 year ago

The name value for an azurerm_cdn_frontdoor_firewall_policy does not support dashes - only letters and numbers. The module generates the outputs with dashes concatenating the various inputs.

╷
│ Error: "name" did not match regex "(^[a-zA-Z])([\\da-zA-Z]{0,127})$"
│
│   with module.appservice.azurerm_cdn_frontdoor_firewall_policy.global["ui-staging"],
│   on module\main.tf line 475, in resource "azurerm_cdn_frontdoor_firewall_policy" "global":
│  475:   name                              = each.value.waf_policy_name
│
╵

The value of "each.value.waf_policy_name" was generated with the naming module version 0.2.0...

module "naming" {
  source  = "Azure/naming/azurerm"
  version = "0.2.0"

  suffix = [var.project_name]
}
natilik-mikeguy commented 1 year ago

This is also the same for storage accounts.