nutanix / terraform-provider-nutanix

Terraform Nutanix Provider
https://www.terraform.io/docs/providers/nutanix/
Mozilla Public License 2.0
101 stars 112 forks source link

Network Security Policy Error #685

Open AlexDias95 opened 2 months ago

AlexDias95 commented 2 months ago

We are trying to test Nutanix terraform provider and we have faced problems with the nutanix_network_security_rule resource.

Our Nutanix and API version are the following:

image

image

The provider version we are using is 1.9.5.

The code that we are using for this example is the following:

resource "nutanix_network_security_rule" "isolation" {
    name        = "example-isolation-rule"
    description = "Isolation Rule Example"

    isolation_rule_action = "APPLY"

    isolation_rule_first_entity_filter_kind_list = ["vm"]
    isolation_rule_first_entity_filter_type      = "CATEGORIES_MATCH_ALL"
    isolation_rule_first_entity_filter_params {
        name   = "Environment"
        values = ["Dev"]
    }

    isolation_rule_second_entity_filter_kind_list = ["vm"]
    isolation_rule_second_entity_filter_type      = "CATEGORIES_MATCH_ALL"
    isolation_rule_second_entity_filter_params {
        name   = "Environment"
        values = ["Production"]
    }
}

The error we get is:

│ Error: error creating Nutanix Network Security Rule example-isolation-rule: error: {
│   "api_version": "3.1",
│   "code": 410,
│   "message_list": [
│     {
│       "message": "The network security rule APIs are no longer supported. Please use the network security policy APIs instead. Refer to the Nutanix API documentation for additional details.",
│       "reason": "GONE_ERROR"
│     }
│   ],
│   "state": "ERROR"
│ }
│
│   with nutanix_network_security_rule.isolation,
│   on file.tf line 1, in resource "nutanix_network_security_rule" "isolation":
│    1: resource "nutanix_network_security_rule" "isolation" {
│