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
Error: error attaching tags to object ID "vm-11574": Get unexpected status code: 404: call failed: Error response from vCloud Suite API: {"type":"com.vmware.vapi.std.errors.not_found","value":{"messages":[{"args":["urn:vmomi:InventoryServiceCategory:29f72ecf-efd0-4276-9f16-11fbe85c3d45:GLOBAL"],"default_message":"Tagging object urn:vmomi:InventoryServiceCategory:29f72ecf-efd0-4276-9f16-11fbe85c3d45:GLOBAL not found","id":"cis.tagging.objectNotFound.error"}]}}
on main.tf line 43, in resource "vsphere_virtual_machine" "vm":
43: resource "vsphere_virtual_machine" "vm" {
Expected Behavior
What should have happened? Terraform should have saw the assigned tag categories and applied the tag the virtual machine post spin up.
Actual Behavior
What actually happened? The VM was created however the tag was not applied
Hey @rui-su-bnet! The reason you're getting a 404 error when you apply your configuration is that the you've got tag categories listed in vsphere_virtual_machine.tags rather than the tags themselves. The categories are an attribute of the tags for determining how they are grouped an what they can be applied to, but you need to apply specific tags to a resource. For example, the following should work given your config:
Terraform Version
Terraform v0.12.3
Provider Version
provider.vsphere v1.12.0
Affected Resource(s)
vsphere_tag
vsphere_tag_category
If this issue appears to affect multiple resources, it may be an issue with
Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
Error: error attaching tags to object ID "vm-11574": Get unexpected status code: 404: call failed: Error response from vCloud Suite API: {"type":"com.vmware.vapi.std.errors.not_found","value":{"messages":[{"args":["urn:vmomi:InventoryServiceCategory:29f72ecf-efd0-4276-9f16-11fbe85c3d45:GLOBAL"],"default_message":"Tagging object urn:vmomi:InventoryServiceCategory:29f72ecf-efd0-4276-9f16-11fbe85c3d45:GLOBAL not found","id":"cis.tagging.objectNotFound.error"}]}}
on main.tf line 43, in resource "vsphere_virtual_machine" "vm":
43: resource "vsphere_virtual_machine" "vm" {
Expected Behavior
What should have happened? Terraform should have saw the assigned tag categories and applied the tag the virtual machine post spin up.
Actual Behavior
What actually happened? The VM was created however the tag was not applied
Steps to Reproduce
terraform plan
terraform apply
References
#380 (not sure if this is the same issue)
The text was updated successfully, but these errors were encountered: