aztfmod / terraform-provider-azurecaf

Terraform provider for the Terraform platform engineering for Azure
MIT License
176 stars 95 forks source link

Please add option to "fail_on_truncate" to never create without specific prefixes and suffixes etc #216

Open mikew3432 opened 1 year ago

mikew3432 commented 1 year ago

We want azurecaf_name to hard fail on over length constaint, instead of trying to guess a fitting name.

Example - we want to create a key vault name - max of 24 chars

resource "azurecaf_name" "myvault" { resource_type = "azurerm_key_vault" separator = "-" (default) prefixes = ["yyy"] suffixes = ["zzz"] name = "abcde-ghijklm-opqrst" }

i.e. result "should" be "yyy-kv-abcde-ghijklm-opqrst-zzz" - except for being over length constraint of 24 chars