You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and AzureRM Provider) Version
Terraform v0.12.24
provider.azurerm v2.7.0
Affected Resource(s)
azurerm_windows_virtual_machine_scale_set
Terraform Configuration Files
resource"azurerm_windows_virtual_machine_scale_set""vmss" {
name ="longVirtualMachineScaleSetName"
computer_name_prefix ="vmss"...
}
Expected Behavior
No errors, the name in the portal is a valid name for the resource in the portal (there is no 15 character limit) and the computer_name_prefix is used in composing the node names within the cluster.
Actual Behavior
Error: "name" can be at most 15 characters, got 30
on .terraform/modules/vmss/main.tf line 6, in resource "azurerm_windows_virtual_machine_scale_set" "vmss":
6: resource "azurerm_windows_virtual_machine_scale_set" "vmss" {
It appears the validation function is unaware of whether the name is being used as the computer_name_prefix and is applying the same rules regardless. In the case that the computer_name_prefix is provided, the rules should not be checking whether name is valid for windows hostname, but instead just validating that it is a valid azure resource name.
Steps to Reproduce
terraform plan
Important Factoids
References
#0000
The text was updated successfully, but these errors were encountered:
@mjneuharth thanks for pointing this problem, it has been fix by #6639, which is released by version 2.8.0. Could you please upgrade your azurerm version ?
As @njuCZ has mentioned this has been fixed in v2.8.0 - you can upgrade to this by updating the version in the Provider block (as shown below) and then running terraform init -upgrade:
provider "azurerm" {
version = "= 2.8.0"
}
Since this should be fixed by updating the version of the Azure Provider being used I'm going to close this issue for the moment - but please let us know if that doesn't work for you and we'll take another look.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.12.24
provider.azurerm v2.7.0
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
No errors, the
name
in the portal is a valid name for the resource in the portal (there is no 15 character limit) and thecomputer_name_prefix
is used in composing the node names within the cluster.Actual Behavior
It appears the validation function is unaware of whether the
name
is being used as thecomputer_name_prefix
and is applying the same rules regardless. In the case that thecomputer_name_prefix
is provided, the rules should not be checking whethername
is valid for windows hostname, but instead just validating that it is a valid azure resource name.Steps to Reproduce
terraform plan
Important Factoids
References
The text was updated successfully, but these errors were encountered: