Open jantari opened 1 year ago
This is still an issue btw
EDIT:
By the way, the documentation for resource_domain.resources.#.limit
says:
(unspecified is unlimited)
however, unspecified
is not a valid terraform value/keyword. Putting it in quotes doesn't work because limit
has to be a number. The limit field is an Int64 but attempting to set a negative number such as -1
which is often used to denote "none/unlimited" in other APIs results in an error. Setting limit to null
doesn't work either. So what the heck is / how do I choose "unspecified" as a value? The field is required so I cannot omit it.
Well, I still don't know, but for anyone else running into this error: setting the limit value to 0
seems to do the trick of effectively setting the limit to unlimited. So adding the following to all of your "nutanix_project" resources works around this issue:
resource "nutanix_project" "example" {
...
# I have no idea why, but setting a resource restriction on a project is required now.
# Setting the limit to 0 seems to make it unlimited although I cannot find documentation for this.
# See: https://github.com/nutanix/terraform-provider-nutanix/issues/648
resource_domain {
resources {
resource_type = "VCPUS"
limit = 0
}
}
}
Nutanix Cluster Information
Nutanix Cluster: 6.5.3.7 Nutanix Prism Cemtral: pc.2023.3
Terraform Version
Terraform v1.4.7
Affected Resource(s)
Terraform Configuration Files
Debug Output
I cannot provide the full debug output because it contains secrets. Here is the plan output:
and this is the debug output of the error it throws during the apply:
--->
Panic Output
No panic.
Expected Behavior
The provider should not have detected any changes and just left the project the way it's always been since its creation.
Actual Behavior
For some reason the provider acts like it wants to add a default_subnet_reference even though this has always been set, but even when going forward with the apply it just runs into an unhelpful error when trying to update the project.
Steps to Reproduce
default_subnet_reference
, attemptting to apply the plan will failImportant Factors
We are using Prism Central micro-services deployment.
I have noticed that adding a
resource_domain
configuration to thenutanix_project
resource like this:fixes this issue, now the apply goes through without an error. However, we do not want to configure resource limits on our projects and this has worked perfectly before.
According to the documentation: https://registry.terraform.io/providers/nutanix/nutanix/latest/docs/resources/project#resource_domain the
resource_domain
setting is required. But this is not true, one can easily create a project without any resource quotas in the Prism Central WebGUI or via terraform or the API. But if there is noresource_domain
configured the subsequent applys will fail.References
648 <!---Github Issue number --->