-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
Nutanix Cluster Information
PC Version: pc.7.3.1.3 and pc.7.5.0.5
Terraform Version
tofu --version
OpenTofu v1.10.3
on darwin_arm64Affected Resource(s)
- nutanix_plugin
- Nutanix Terraform Provider version
version = "2.3.4" and "2.4.0"Debug Output
++ Payload
-----------------------------------------------------: timestamp="2026-02-16T09:26:51.782+0100"
2026-02-16T09:26:51.784+0100 [INFO] provider.terraform-provider-nutanix_v2.3.4: 2026/02/16 09:26:51 [DEBUG] Nutanix API Request Details:
---[ REQUEST ]---------------------------------------
PUT /api/nutanix/v3/projects_internal/8371f4b8-ed24-4650-8a68-be4e1fffaf08 HTTP/1.1++ Styx logs from PC
[2026-01-19 07:26:41.056457Z] ERROR [styx:319121:Dummy-113] [:][cr:a8da31ad-1686-4ce8-9941-76f434838270][pr:][rr:a8da31ad-1686-4ce8-9941-76f434838270] calm.server.styx.v3.api.project_resource_intentful.:812 [:::] Encountered exception Failed to complete request to https://iam-proxy.ntnx-base:8445/api/iam/a
uthz/v1/proxy after 5 tries. Error: HTTP Error 500: INTERNAL SERVER ERROR with get_kind
2026-01-19 07:26:41,065Z ERROR resource.py:254 Traceback (most recent call last):
File "//home/calm/venv3/lib/python3.9/site-packages/calm/server/styx/v3/api/project_resource_intentful.py", line 809, in get
File "//home/calm/venv3/lib/python3.9/site-packages/calm/lib/kind/project_internal.py", line 601, in get_kind
File "/home/calm/venv3/lib/python3.9/site-packages/aplos/intentengine/kind/pc/access_control_policy.py", line 68, in wrapped_method_handle
result = iamv2AP.invoke_proxy(incoming_op, **kwargs)
File "/home/calm/venv3/lib/python3.9/site-packages/aplos/lib/themis/iamv2/access_policy.py", line 278, in invoke_proxy
result = get_ap(str(kwargs.get("uuid")))
File "/home/calm/venv3/lib/python3.9/site-packages/aplos/lib/themis/iamv2/access_policy.py", line 311, in get_ap
r = themis_20.invoke_call(params)
File "/home/calm/venv3/lib/python3.9/site-packages/aplos/lib/themis/iamv2/themis_20.py", line 63, in invoke_call
response = client_util.make_request(
File "/home/calm/venv3/lib/python3.9/site-packages/aplos/lib/iamv2/client_util.py", line 178, in make_request
raise IAMv2ClientError(error)
aplos.lib.iamv2.exceptions.IAMv2ClientError: Failed to complete request to https://iam-proxy.ntnx-base:8445/api/iam/authz/v1/proxy after 5 tries. Error: HTTP Error 500: INTERNAL SERVER ERROR
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/calm/venv3/lib/python3.9/site-packages/aplos/intentgw/v3_pc/api/resource.py", line 252, in dispatch_request
return super(Resource, self).dispatch_request(*args, **kwargs)
File "/home/calm/venv3/lib/python3.9/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
resp = meth(*args, **kwargs)
File "//home/calm/venv3/lib/python3.9/site-packages/calm/server/styx/v3/api/__init__.py", line 157, in wrapper
File "//home/calm/venv3/lib/python3.9/site-packages/calm/server/styx/v3/api/__init__.py", line 96, in wrapper
File "//home/calm/venv3/lib/python3.9/site-packages/calm/server/styx/v3/validators.py", line 195, in wrapper
File "//home/calm/venv3/lib/python3.9/site-packages/calm/server/styx/v3/validators.py", line 186, in wrapper
File "//home/calm/venv3/lib/python3.9/site-packages/calm/server/styx/v3/api/project_resource_intentful.py", line 817, in get
aplos.exceptions.api_error.ApiError: {'api_version': '3.1',
'code': <HTTPStatus.NOT_FOUND: 404>,
'kind': 'project',
'message_list': [{'message': 'project : dbf1156c-db57-45bf-93c6-08c6f53e39ad '
'could not be read.',
'reason': 'ENTITY_READ_ERROR'}],
'state': 'ERROR'}
[2026-01-19 07:26:41.066465Z] INFO [styx:319121:Dummy-113] [:][cr:a8da31ad-1686-4ce8-9941-76f434838270][pr:][rr:a8da31ad-1686-4ce8-9941-76f434838270] calm.lib.model.store.db_session.session.:341 [:::] Flushing current session. Changes will be pushed to db.
[2026-01-19 07:26:41.066661Z] INFO [styx:319121:Dummy-113] [:][cr:a8da31ad-1686-4ce8-9941-76f434838270][pr:][rr:a8da31ad-1686-4ce8-9941-76f434838270] calm.lib.model.store.db_session.idf_session.:68 [:::] Flushing session to DB
[pid: 319121|app: -|req: -/-] 127.0.0.1 () {84 vars in 5853 bytes} [Mon Jan 19 08:26:33 2026] GET /dm/v3/projects_internal/dbf1156c-db57-45bf-93c6-08c6f53e39ad Panic Output
16:42:59.281 STDERR tofu: │ Error: error: {
16:42:59.281 STDERR tofu: │ "api_version": "3.1",
16:42:59.281 STDERR tofu: │ "code": 404,
16:42:59.281 STDERR tofu: │ "kind": "project",
16:42:59.281 STDERR tofu: │ "message_list": [
16:42:59.281 STDERR tofu: │ {
16:42:59.281 STDERR tofu: │ "message": "project : 77152b8a-99a4-4e06-a2b1-f9afac549ffe could not be read.",
16:42:59.281 STDERR tofu: │ "reason": "ENTITY_READ_ERROR"
16:42:59.281 STDERR tofu: │ }
16:42:59.281 STDERR tofu: │ ],
16:42:59.281 STDERR tofu: │ "state": "ERROR"
16:42:59.281 STDERR tofu: │ }
16:42:59.281 STDERR tofu: │
16:42:59.281 STDERR tofu: │ with nutanix_project.project,
16:42:59.281 STDERR tofu: │ on main.tf line 156, in resource "nutanix_project" "project":
16:42:59.281 STDERR tofu: │ 156: resource "nutanix_project" "project" {
16:42:59.282 STDERR tofu: │
16:42:59.282 STDERR tofu: ╵
16:42:59.371 ERROR tofu invocation failed in ./.terragrunt-cache/aV9FQgWgxnfctNP2aVQikjLlLzY/lqR4AeI0uYEYNTEiuS7EIODYl1I/project
16:42:59.371 ERROR error occurred:
* Failed to execute "tofu plan" in ./.terragrunt-cache/aV9FQgWgxnfctNP2aVQikjLlLzY/lqR4AeI0uYEYNTEiuS7EIODYl1I/project
╷
│ Error: error: {
│ "api_version": "3.1",
│ "code": 404,
│ "kind": "project",
│ "message_list": [
│ {
│ "message": "project : 77152b8a-99a4-4e06-a2b1-f9afac549ffe could not be read.",
│ "reason": "ENTITY_READ_ERROR"
│ }
│ ],
│ "state": "ERROR"
│ }
│
│ with nutanix_project.project,
│ on main.tf line 156, in resource "nutanix_project" "project":
│ 156: resource "nutanix_project" "project" {
│
╵
exit status 1 Expected Behavior
The project creation and updation from Terraform with the custom role should get created and updated successfully, and should be accessible from PC UI.
Actual Behavior
When the customer is creating the project using terraform the project gets "KeyError: directory_service" error on UI, and when trying to access the same project from the UI getting "THE REQUESTED PAGE WAS NOT FOUND."
Steps to Reproduce
bws run -- TF_LOG="DEBUG" terragrunt applytofu plan
Important Factors
+ The issue is project created via Terraform is coming with the default Project Admin role and not with the custom role specified in Terraform variables.
- From the documentation, we could see the
use_project_internalflag to use project internal for user role mapping
https://registry.terraform.io/providers/nutanix/nutanix/latest/docs/resources/project#use_project_internal-1 - Customer has set the project internal flag, but is still unable to create the project with the right role mapping.
https://github.com/nutanix/terraform-provider-nutanix/blob/release/2.3.3/nutanix/services/prism/resource_nutanix_project.go - Customer created the project with no specific role(excluded role updation module) the project was created successfully
- Customer can add a custom role from the UI after a successful project creation from the UI, but not from Terraform modules.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels