oracle / oci-ansible-collection

Oracle Cloud Infrastructure Ansible Collection provides an easy way to provision and manage resources in Oracle Cloud using Ansible.
https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/ansible.htm
Other
173 stars 97 forks source link

oci_network_firewall_policy does not create security_rules, address_lists, etc. #275

Open jeliker opened 8 months ago

jeliker commented 8 months ago

Issue Report

Creating Network Firewall Policy with address_lists and security_rules but neither are created (only the policy itself).

Expected behavior Specifying network firewall policy with address_lists and security_rules attributes so expect to have new policy containing both created. Watching with debug output and I see the attributes for each recognized and shown but only the API call for CreateNetworkFirewallPolicy occurs. There should be subsequent calls to CreateAddressList and CreateSecurityRule which do not happen.

Environment

Ansible playbook to reproduce the issue

  - name: Create NFW policy
    oracle.oci.oci_network_firewall_policy:
      compartment_id: "{{ compartment_id }}"
      display_name: policy_from_ansible
      ip_address_lists:
        "any_all":
          - 0.0.0.0/0
        "private_cidrs":
          - 10.1.0.0/16
          - 10.2.0.0/15

      security_rules:
        - name: allow_private
          condition:
            sources:
              - any_all
            destinations:
              - private_cidrs
          action: ALLOW
        - name: deny_all
          condition:
            sources:
              - any_all
            destinations:
              - any_all
          action: DROP
dineshsuthar786 commented 8 months ago

@jeliker Can you enable debug logs using https://docs.oracle.com/en-us/iaas/tools/oci-ansible-collection/latest/guides/logging-guide.html document and share debug logs with us.

jeliker commented 8 months ago

debug.txt

FYI @dineshsuthar786