-
Notifications
You must be signed in to change notification settings - Fork 112
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
Undefined property is_connected of class vm_nic detected #90
Comments
Hello, @mwarner1. The VM resource has had changes, so could check/test if the same error persists on the master branch? If you have another comment or concern, just let me know, thank you so much |
Unfortunately I no longer have access to that environment so I cannot test it. |
Thank you for your reply @mwarner1 , I see, can you share the config file without sensitive data? So I can be sure if I tested with a similar config like yours or test it for you and can this ticket can be closed? |
Hello @mwarner1 , this is the config file I used to test, not sure if it's similar when you tried. data "nutanix_clusters" "clusters" {}
locals {
cluster1 = [
for cluster in data.nutanix_clusters.clusters.entities :
cluster.metadata.uuid if cluster.service_list[0] != "PRISM_CENTRAL"
][0]
}
resource "nutanix_subnet" "sub" {
cluster_uuid = "${local.cluster1}"
# General Information for subnet
name = "terraform-vm-with-subnet-%[1]d"
description = "Description of my unit test VLAN"
vlan_id = %[1]d
subnet_type = "VLAN"
# Provision a Managed L3 Network
# This bit is only needed if you intend to turn on AHV's IPAM
subnet_ip = "10.250.140.0"
default_gateway_ip = "10.250.140.1"
prefix_length = 24
dhcp_options = {
boot_file_name = "bootfile"
domain_name = "nutanix"
tftp_server_name = "11.250.140.200"
}
dhcp_domain_name_server_list = ["8.8.8.8", "4.2.2.2"]
dhcp_domain_search_list = ["terraform.nutanix.com", "terraform.test.com"]
ip_config_pool_list_ranges = ["11.250.140.20 11.250.140.100"]
}
resource "nutanix_image" "cirros-034-disk" {
name = "test-image-%[1]d"
source_uri = "http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img"
description = "heres a tiny linux image, not an iso, but a real disk!"
}
resource "nutanix_virtual_machine" "vm3" {
name = "test-vm-%[1]d"
categories {
name = "Environment"
value = "Staging"
}
cluster_uuid = "${local.cluster1}"
num_vcpus_per_socket = 1
num_sockets = 1
memory_size_mib = 186
disk_list {
data_source_reference = {
kind = "image"
uuid = "${nutanix_image.cirros-034-disk.id}"
}
}
nic_list {
subnet_uuid = "${nutanix_subnet.sub.id}"
}
}
output "ip_address" {
value = "${lookup(nutanix_virtual_machine.vm3.nic_list_status.0.ip_endpoint_list[0], "ip")}"
} |
I had to look around in old notes, but I believe this was all I used at the
time:
provider "nutanix" {
username = "admin"
password = "password_goes_here"
endpoint = "localhost"
insecure = true
port = 9440
wait_timeout = 10
}
data "nutanix_clusters" "clusters" {}
resource "nutanix_volume_group" "The-VolGroup" {
name = "The-VolGroup"
description = "Volume Group for the environment"
disk_list {
disk_size_mib = "200G"
}
}
resource "nutanix_virtual_machine" "machine_name" {
name = "machine_name"
cluster_uuid = "uuid_here"
num_vcpus_per_socket = 1
num_sockets = 2
memory_size_mib = 8192
hardware_clock_timezone = "America/Los_Angeles"
vga_console_enabled = true
nic_list {
subnet_name = "VLAN25"
subnet_uuid = "subnet_uuid_here"
is_connected = null
}
disk_list {
data_source_reference = {
uuid = "image_uuid_here"
kind = "image"
}
device_properties {
disk_address = {
device_index = 0
adapter_type = "SCSI"
}
device_type = "DISK"
}
}
}
…On Thu, May 28, 2020 at 2:44 PM coderGo93 ***@***.***> wrote:
Hello @mwarner1 <https://github.com/mwarner1> , this is the config file I
used to test, not sure if it's similar when you tried.
data "nutanix_clusters" "clusters" {}
locals {
cluster1 = [
for cluster in data.nutanix_clusters.clusters.entities :
cluster.metadata.uuid if cluster.service_list[0] != "PRISM_CENTRAL"
][0]
}
resource "nutanix_subnet" "sub" {
cluster_uuid = "${local.cluster1}"
# General Information for subnet
name = "terraform-vm-with-subnet-%[1]d"
description = "Description of my unit test VLAN"
vlan_id = %[1]d
subnet_type = "VLAN"
# Provision a Managed L3 Network
# This bit is only needed if you intend to turn on AHV's IPAM
subnet_ip = "10.250.140.0"
default_gateway_ip = "10.250.140.1"
prefix_length = 24
dhcp_options = {
boot_file_name = "bootfile"
domain_name = "nutanix"
tftp_server_name = "11.250.140.200"
}
dhcp_domain_name_server_list = ["8.8.8.8", "4.2.2.2"]
dhcp_domain_search_list = ["terraform.nutanix.com", "terraform.test.com"]
ip_config_pool_list_ranges = ["11.250.140.20 11.250.140.100"]
}
resource "nutanix_image" "cirros-034-disk" {
name = "test-image-%[1]d"
source_uri = "http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img"
description = "heres a tiny linux image, not an iso, but a real disk!"
}
resource "nutanix_virtual_machine" "vm3" {
name = "test-vm-%[1]d"
categories {
name = "Environment"
value = "Staging"
}
cluster_uuid = "${local.cluster1}"
num_vcpus_per_socket = 1
num_sockets = 1
memory_size_mib = 186
disk_list {
data_source_reference = {
kind = "image"
uuid = "${nutanix_image.cirros-034-disk.id}"
}
}
nic_list {
subnet_uuid = "${nutanix_subnet.sub.id}"
}
}
output "ip_address" {
value = "${lookup(nutanix_virtual_machine.vm3.nic_list_status.0.ip_endpoint_list[0], "ip")}"
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/terraform-providers/terraform-provider-nutanix/issues/90#issuecomment-635624633>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAROHWY52FLR2TLXMHIRB6LRT3LLTANCNFSM4J3SAXJQ>
.
|
Hello @mwarner1 , thanks for the config, I made test with similar config and it worked for me, I'll close this ticket. |
The Terraform Nutanix provider is sending is_connected as part of the "nic_list" stanza, but at least with REST API version 3.1, this is not allowed. Manually sending the Terraform-generated JSON after deleting the is_connected succeeds.
Expected behavior
VM should be provisioned.
Logs
Debug output attached
logs.txt
Versions (please complete the following information):
Additional context
None
The text was updated successfully, but these errors were encountered: