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
Describe the bug
Cannot list ip addresses of when creating multiple virtual machine resources
Expected behavior
Should be able to list the ip addresses of all the vm resources using the following syntax output "ip" { value = "${join(",",nutanix_virtual_machine.my-machine.*.nutanix_virtual_machine.deployment.*.nic_list_status.0.ip_endpoint_list.0.ip)}" }
If the above interpolation is not possible can we please expose the ip_address attribute from the resources that were created. According to this doc ip_address should be available on a virtual machine data source but trying to access it, fails with Resource 'data.nutanix_virtual_machine.ips1' does not have attribute 'ip_address' for variable 'data.nutanix_virtual_machine.ips1.ip_address'
Logs
Trying to list the output getting the following error, nutanix_virtual_machine.deployment’ does not have attribute ‘nic_list_status.0.ip_endpoint_list.0.ip
trying to access ip_address in vm data_source gets following error
Resource 'data.nutanix_virtual_machine.ips1' does not have attribute 'ip_address' for variable 'data.nutanix_virtual_machine.ips1.ip_address'
Versions (please complete the following information):
OS - OSX mojave
Terraform - 0.11.3
Nutanix Cluster - 5.10.2
Nutanix Prism Central - 5.10.2
1.0.1
Additional context
Looks like we can't display the ip address when we have multiple nested lists/maps. Can we get the ip_address exposed from the created vm to access?
The text was updated successfully, but these errors were encountered:
I also have the same problem, someone managed to solve?
I'm using the below version of terraform and provider
Terraform v0.12.18
provider.nutanix v1.0.2
I am using count.index to create VM multiples.
I can't get ip_address outputs.
My environment distributes IP via DHCP.
Example.
value = "${lookup(nutanix_virtual_machine.vm.*.nic_list.0.ip_endpoint_list[0], "ip")}"
}
erro
on ../../create_vms/outputs.tf line 29, in output "ip_address":
29: value = "${lookup(nutanix_virtual_machine.vm.*.nic_list.0.ip_endpoint_list[0], "ip")}"
|----------------
| nutanix_virtual_machine.vm is tuple with 1 element
Invalid value for "inputMap" parameter: lookup() requires a map as the first
argument.
I can solve my problem with the function zipmap below.
# Show IP addressoutput"ip_address" {
description="Returns the name and ip_address of the created vm"value="${zipmap(nutanix_virtual_machine.vm.*.name, nutanix_virtual_machine.vm.*.nic_list.0.ip_endpoint_list.0.ip)}"
}
Describe the bug
Cannot list ip addresses of when creating multiple virtual machine resources
Expected behavior
Should be able to list the ip addresses of all the vm resources using the following syntax
output "ip" { value = "${join(",",nutanix_virtual_machine.my-machine.*.nutanix_virtual_machine.deployment.*.nic_list_status.0.ip_endpoint_list.0.ip)}" }
If the above interpolation is not possible can we please expose the ip_address attribute from the resources that were created. According to this doc ip_address should be available on a virtual machine data source but trying to access it, fails with
Resource 'data.nutanix_virtual_machine.ips1' does not have attribute 'ip_address' for variable 'data.nutanix_virtual_machine.ips1.ip_address'
Logs
Trying to list the output getting the following error,
nutanix_virtual_machine.deployment’ does not have attribute ‘nic_list_status.0.ip_endpoint_list.0.ip
trying to access ip_address in vm data_source gets following error
Resource 'data.nutanix_virtual_machine.ips1' does not have attribute 'ip_address' for variable 'data.nutanix_virtual_machine.ips1.ip_address'
Versions (please complete the following information):
Additional context
Looks like we can't display the ip address when we have multiple nested lists/maps. Can we get the ip_address exposed from the created vm to access?
The text was updated successfully, but these errors were encountered: