Skip to content
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

Issues with nutanix_project and associating an ACP #684

Open
aric49 opened this issue Aug 1, 2024 · 0 comments
Open

Issues with nutanix_project and associating an ACP #684

aric49 opened this issue Aug 1, 2024 · 0 comments
Assignees

Comments

@aric49
Copy link

aric49 commented Aug 1, 2024

Overall Issue:

When attempting to deploy a project with an acp block, the following error is getting returned during the terraform apply phase:

╷
 │ Error: error: {
 │   "api_version": "3.1",
 │   "code": 422,
 │   "message_list": [
 │     {
 │       "details": {
 │         "spec.access_control_policy_list.0.acp.resources.filter_list.context_list.1": [
 │           "'entity_filter_expression_list' is a required property"
 │         ]
 │       },
 │       "message": "Request could not be processed.",
 │       "reason": "INVALID_REQUEST"
 │     }
 │   ],
 │   "state": "ERROR"
 │ }
 │
 │   with module.shared.nutanix_project.project,
 │   on ..\..\..\modules\my-project\project.tf line 1, in resource "nutanix_project" "project":
 │    1: resource "nutanix_project" "project" {

The terraform plan phase runs as expected. The documentation does not specify if we need to include any other arguments into the ACP block in order for it deploy properly: https://registry.terraform.io/providers/nutanix/nutanix/latest/docs/resources/project#acp

Nutanix Cluster Information

Terraform Version

$ terraform -v
Terraform v1.4.6
on windows_amd64
+ provider registry.terraform.io/nutanix/nutanix v1.9.5

Your version of Terraform is out of date! The latest version
is 1.9.3. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

  • nutanix_project

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file.
resource "nutanix_project" "project" {
  name                 = var.name
  use_project_internal = true
  description          = var.name
 
 
  resource_domain {
    resources {
      resource_type = "VCPUS"
      limit         = 50
    }
    resources {
      resource_type = "STORAGE"
      limit         = 1073741824000
    }
    resources {
      resource_type = "MEMORY"
      limit         = 536870912000
    }
  }
 
  default_subnet_reference {
    uuid = nutanix_subnet.subnet.metadata.uuid
  }
 
  subnet_reference_list {
    uuid = nutanix_subnet.subnet.metadata.uuid
  }
 
  vpc_reference_list {
    uuid = nutanix_vpc.vpc.metadata.uuid
  }
 
  cluster_reference_list {
    uuid = "CENSORED"
  }
 
  account_reference_list {
    uuid = "CENSORED"
  }

  acp {
    name        = "${var.name}-vm-read-only"
    description = "Creates a read-only role for this project"
    role_reference {
      kind = "role"
      uuid = data.nutanix_role.vm_read_only.id
      name = data.nutanix_role.vm_read_only.name
    }
    # user_reference_list {
    #   kind = "user"
    #   uuid = data.nutanix_user.test_user.id
    # }
    # user_group_reference_list {
    #   kind = "user_group"
    #   uuid = data.nutanix_user_group.ad_group.id
    # }
  }
  api_version = "3.1
}

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factors

  • #0000 <!---Github Issue number --->
@abhimutant abhimutant self-assigned this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants