Add FQDNs parameter to VirtualMachine class in azure.mgmt.compute.v2020_06_01.models.VirtualMachine
See original GitHub issueIs your feature request related to a problem? Please describe. I’d like to retrieve VM FQDNs with Python to compare them with DNS Zone Cname record canonical names.
Describe the solution you’d like
Currently, the VirtualMachine class defined in azure.mgmt.compute.v2020_06_01.models.VirtualMachine
does not have the FQDN member variable. See: https://docs.microsoft.com/en-us/python/api/azure-mgmt-compute/azure.mgmt.compute.v2020_06_01.models.virtualmachine?view=azure-python
Adding that member variable would make it very easy to find the FQDN / domain name of a VM resource.
Describe alternatives you’ve considered The azure cli lets you retrieve the FQDNs of a VM as follows:
az vm show --show-details --resource-group <rg_name> --name <vm_name> --query "[fqdns]"
I thought of running this command inside my Python code, but this defeats the purpose in my situation since I am using managed identities and not CLI credentials in my code (an Azure function). Also, Azure functions written in Python appears to not support CLI-usage with ease, as indicated here: https://stackoverflow.com/questions/59354593/run-azure-cli-commands-from-a-azure-function-app#:~:text=Azure function does not support,create resources and manage them.
I have also thought of comparing DNS Zone canonical names to VM names, but VM names are arbitrary and may change over time, whereas the FQDNs, albeit also possible to change, appear more static. Consequently, under those assumptions, using VM names is less reliable than using VM public DNS names when comparing them to DNS Zone CName record canonical names.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (2 by maintainers)
Hey @avirishuv thank you for the update. I will get back to you soon with information.
@r3mattia Let me look into this, will get back with more information.