Azure-Terraform / terraform-azurerm-virtual-machine

Terraform Virtual Machine Module
MIT License
8 stars 27 forks source link

Support for custom hostname values #3

Closed b-odonoghue closed 3 years ago

b-odonoghue commented 3 years ago

By default when you build a host using this module it will take the name of the resource name. Though there are some cases where it would be great to be able to supply a custom hostname value.

Looking both linux and windows support the computer_name value to set a custom hostname and as an option variable we can just set that value to the resource name if some custom name is not specified.

jhisc commented 3 years ago

Hi @b-odonoghue

I've created a MR and example to address this request: https://github.com/Azure-Terraform/terraform-azurerm-virtual-machine/pull/4/

Can you review and confirm it matches your requirements please? Example - https://github.com/Azure-Terraform/terraform-azurerm-virtual-machine/blob/linux_hostname/examples/linux-custom-hostname/main.tf#L98

Thanks

b-odonoghue commented 3 years ago

@jhisc this looks great thank you!

jhisc commented 3 years ago

Change has been tagged v1.2.0