Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Length constraint for VM name #249

Open
gregbaleyy opened this issue Aug 2, 2023 · 2 comments
Open

Length constraint for VM name #249

gregbaleyy opened this issue Aug 2, 2023 · 2 comments

Comments

@gregbaleyy
Copy link

For windows VM and VMSS name, we are limited to a max length of 15 characters where as we should have up to 64 characters according to https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.VM.Name/

@gregbaleyy
Copy link
Author

gregbaleyy commented Aug 2, 2023

It looks like you enforced limits of computer name on VM name
https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.VM.ComputerName/

@RockyMM
Copy link

RockyMM commented Mar 7, 2024

I also see this behaviour. All resource_types that are related to VMs, i.e. azurerm*_virtual_machine produce results which are not according to CAF.

E.g.

resource "azurecaf_name" "vm" {

  resource_type = "azurerm_windows_virtual_machine"

  name = "012345678901234567"

  suffixes = [
    "dev",
    "westeurope"
  ]

}

output "vm_name" {
  value = azurecaf_name.vm.result
}

The result is vm-dev which is unexpected. Upon reading more about the topic, it is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants