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

[Bug] Purpose field mandatory to update the security policy from Ansible in module ntnx_security_rules #485

Open
atlasblue opened this issue Jun 25, 2024 · 1 comment · May be fixed by #509
Assignees
Labels
1.9.3_triage Bug fixes & Improvements bug Something isn't working

Comments

@atlasblue
Copy link

Encountering a problem when creating Security Rules with Flow using the ntnx_security_rules module provided by the Ansible collection.
It is currently not possible to define the Purpose parameter of the security Rule in the script. In the GUI, this parameter corresponds to the Purpose field and this is a mandatory field to update the security policy from Ansible. Without this parameter it's not possible to modify the rest of the Security Rule.

@atlasblue atlasblue added the bug Something isn't working label Jun 25, 2024
@konstruktoid
Copy link

konstruktoid commented Jul 5, 2024

This there's alot of changes to be made regarding the security rules.

https://github.com/nutanix/nutanix.ansible/blob/main/plugins/modules/ntnx_security_rules.py:

  tasks:
    - name: Create app security rule
      nutanix.ncp.ntnx_security_rules:
        name: test_app_rule
        allow_ipv6_traffic: true
        policy_hitlog: true
        app_rule:
          policy_mode: MONITOR
[...]
{
    "msg": {
        "changed": false,
        "error": null,
        "failed": false,
        "response": {
            "api_version": "3.1",
            "code": 410,
            "kind": "network_security_rule",
            "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"
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.9.3_triage Bug fixes & Improvements bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

7 participants