-
Notifications
You must be signed in to change notification settings - Fork 87
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
Can not find VM with the ID xxxxxxxxx #1159
Comments
Hi @nsharabati, which ID are you using? UI displays quite a few different IDs and it can be confusing |
Hi @annakhm, i used BIOS & Instance IDs. I had the same error for both IDs. |
Could you please post the apply output with verbose debug logs? This would show NSX response and hopefully we'll be able to figure out what goes wrong. Feel free to remove all info that might be confidential from the output, we only need the VM ids. |
This comment was marked as duplicate.
This comment was marked as duplicate.
@annakhm: Here is the Output as plain text 2024-03-26T09:55:52.135+0100 [DEBUG] created provider logger: level=debug {}: timestamp="2024-03-26T09:55:55.541+0100" { Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
Terraform will perform the following actions: nsxt_policy_vm_tags.srv101066 will be created
Plan: 1 to add, 0 to change, 0 to destroy. Do you want to perform these actions? Enter a value: yes 2024-03-26T09:55:58.142+0100 [INFO] backend/local: apply calling Apply Content-Length: 2 {}: timestamp="2024-03-26T09:55:59.551+0100" { User-Agent: vAPI/0.7.0 Go/go1.19.13 (windows; 386) {}: timestamp="2024-03-26T09:56:00.057+0100" ee |
Looks like the user configured in the provider is not authorized to access the VMs. Is this the same user that is able to add VM tags via UI? |
@annakhm: Thank you for your response. Thanks in advanced. |
@nsharabati sorry, unfortunately the fix was merged a couple of days after the |
@annakhm when should we expect the version 3.6.1? |
early July |
Hi @nsharabati, |
Describe the bug
Tag should be assigned to the VM with the ID xxxxxxx
However, NSX-T is responding back with "can not find VM with ID xxxxxx", even that the ID appears on the UI.
Reproduction steps
Main.tf:
resource "nsxt_policy_vm_tags" "srv101066" {
instance_id = "42316ee9-71e5-3e69-6651-4088377d8469"
dynamic "tag" {
for_each = var.nsx_t_tags
content {
scope = tag.value
tag = tag.value
}
}
}
Variables.tf:
variable "nsx_t_tags" {
type=list(string)
}
provider.tf:
terraform {
required_providers {
nsxt = {
source = "vmware/nsxt"
version = "3.4.0"
}
}
}
provider "nsxt" {
host = "YYYYYYY"
username = var.username
password = var.password
allow_unverified_ssl = true
max_retries = 2
}
Terraform Version:
Terraform v1.7.3
on windows_386
Expected behavior
Tag should be assigned to the VM with the ID xxxxxxx
However, NSX-T is responding back with "can not find VM with ID xxxxxx", even that the ID appears on the UI.
Additional context
No response
The text was updated successfully, but these errors were encountered: