Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-1755

[amazon.aws/2197] amazon.aws.rds_cluster Parameter validation failed:\nUnknown parameter in input: \"BackupRetentionPeriod\", must be one of: DBClusterIdentifier\nUnknown parameter in input: \"ApplyImmediately\", must be one of: DBClusterIdentifier"}

XMLWordPrintable

      https://github.com/ansible-collections/amazon.aws/issues/2197

          1. Summary

      when trying to interact with an RDS cluster (using amazon.aws.rds_cluster), it fails with

      Parameter validation failed:\nUnknown parameter in input: \"BackupRetentionPeriod\", must be one of: DBClusterIdentifier\nUnknown parameter in input: \"ApplyImmediately\", must be one of: DBClusterIdentifier"}

          1. Issue Type

      Bug Report

          1. Component Name

      amazon.aws.rds_cluster

          1. Ansible Version

      ansible [core 2.17.2]
      config file = /etc/ansible/ansible.cfg
      configured module search path = ['/home/myuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /home/myuser/ansible-10.1.0/lib/python3.11/site-packages/ansible
      ansible collection location = /home/myuser/.ansible/collections:/usr/share/ansible/collections
      executable location = /home/myuser/ansible-10.1.0/bin/ansible
      python version = 3.11.6 (main, Nov 2 2023, 15:15:45) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] (/home/myuser/ansible-10.1.0/bin/python3)
      jinja version = 3.1.4
      libyaml = True

          1. Collection Versions
      1. /home/myuser/.ansible/collections/ansible_collections
        Collection Version
                                                                                    • -------
                                                                                      amazon.aws 8.1.0
                                                                                      ansible.posix 1.3.0
                                                                                      ansible.windows 2.1.0
                                                                                      community.aws 6.4.0
                                                                                      community.general 4.0.0
                                                                                      community.libvirt 1.2.0
                                                                                      community.postgresql 2.1.5
                                                                                      containers.podman 1.9.3
      1. /home/myuser/ansible-10.1.0/lib/python3.11/site-packages/ansible_collections
        Collection Version
                                                                                    • -------
                                                                                      amazon.aws 8.0.1
                                                                                      ansible.netcommon 6.1.3
                                                                                      ansible.posix 1.5.4
                                                                                      ansible.utils 4.1.0
                                                                                      ansible.windows 2.4.0
                                                                                      arista.eos 9.0.0
                                                                                      awx.awx 24.5.0
                                                                                      azure.azcollection 2.4.0
                                                                                      check_point.mgmt 5.2.3
                                                                                      chocolatey.chocolatey 1.5.1
                                                                                      cisco.aci 2.9.0
                                                                                      cisco.asa 5.0.1
                                                                                      cisco.dnac 6.16.0
                                                                                      cisco.intersight 2.0.9
                                                                                      cisco.ios 8.0.0
                                                                                      cisco.iosxr 9.0.0
                                                                                      cisco.ise 2.9.2
                                                                                      cisco.meraki 2.18.1
                                                                                      cisco.mso 2.6.0
                                                                                      cisco.nxos 8.1.0
                                                                                      cisco.ucs 1.10.0
                                                                                      cloud.common 3.0.0
                                                                                      cloudscale_ch.cloud 2.3.1
                                                                                      community.aws 8.0.0
                                                                                      community.ciscosmb 1.0.9
                                                                                      community.crypto 2.20.0
                                                                                      community.digitalocean 1.26.0
                                                                                      community.dns 3.0.1
                                                                                      community.docker 3.10.4
                                                                                      community.general 9.1.0
                                                                                      community.grafana 1.9.1
                                                                                      community.hashi_vault 6.2.0
                                                                                      community.hrobot 2.0.1
                                                                                      community.library_inventory_filtering_v1 1.0.1
                                                                                      community.libvirt 1.3.0
                                                                                      community.mongodb 1.7.4
                                                                                      community.mysql 3.9.0
                                                                                      community.network 5.0.3
                                                                                      community.okd 3.0.1
                                                                                      community.postgresql 3.4.1
                                                                                      community.proxysql 1.5.1
                                                                                      community.rabbitmq 1.3.0
                                                                                      community.routeros 2.16.0
                                                                                      community.sap_libs 1.4.2
                                                                                      community.sops 1.6.7
                                                                                      community.vmware 4.4.0
                                                                                      community.windows 2.2.0
                                                                                      community.zabbix 2.5.1
                                                                                      containers.podman 1.15.2
                                                                                      cyberark.conjur 1.3.0
                                                                                      cyberark.pas 1.0.25
                                                                                      dellemc.enterprise_sonic 2.4.0
                                                                                      dellemc.openmanage 9.3.0
                                                                                      dellemc.powerflex 2.5.0
                                                                                      dellemc.unity 2.0.0
                                                                                      f5networks.f5_modules 1.28.0
                                                                                      fortinet.fortimanager 2.5.0
                                                                                      fortinet.fortios 2.3.6
                                                                                      frr.frr 2.0.2
                                                                                      google.cloud 1.3.0
                                                                                      grafana.grafana 5.2.0
                                                                                      hetzner.hcloud 3.1.1
                                                                                      ibm.qradar 3.0.0
                                                                                      ibm.spectrum_virtualize 2.0.0
                                                                                      ibm.storage_virtualize 2.3.1
                                                                                      ieisystem.inmanage 2.0.0
                                                                                      infinidat.infinibox 1.4.5
                                                                                      infoblox.nios_modules 1.6.1
                                                                                      inspur.ispim 2.2.3
                                                                                      inspur.sm 2.3.0
                                                                                      junipernetworks.junos 8.0.0
                                                                                      kaytus.ksmanage 1.2.2
                                                                                      kubernetes.core 3.2.0
                                                                                      lowlydba.sqlserver 2.3.3
                                                                                      microsoft.ad 1.6.0
                                                                                      netapp.cloudmanager 21.22.1
                                                                                      netapp.ontap 22.11.0
                                                                                      netapp.storagegrid 21.12.0
                                                                                      netapp_eseries.santricity 1.4.0
                                                                                      netbox.netbox 3.19.1
                                                                                      ngine_io.cloudstack 2.3.0
                                                                                      ngine_io.exoscale 1.1.0
                                                                                      openstack.cloud 2.2.0
                                                                                      openvswitch.openvswitch 2.1.1
                                                                                      ovirt.ovirt 3.2.0
                                                                                      purestorage.flasharray 1.28.1
                                                                                      purestorage.flashblade 1.17.0
                                                                                      sensu.sensu_go 1.14.0
                                                                                      splunk.es 3.0.0
                                                                                      t_systems_mms.icinga_director 2.0.1
                                                                                      telekom_mms.icinga_director 2.1.2
                                                                                      theforeman.foreman 4.0.0
                                                                                      vmware.vmware_rest 3.0.1
                                                                                      vultr.cloud 1.13.0
                                                                                      vyos.vyos 4.1.0
                                                                                      wti.remote 1.0.5
          1. AWS SDK versions

      Name: boto
      Version: 2.49.0
      Summary: Amazon Web Services Library
      Home-page: https://github.com/boto/boto/
      Author: Mitch Garnaat
      Author-email: mitch@garnaat.com
      License: MIT
      Location: /home/myuser/ansible-10.1.0/lib/python3.11/site-packages
      Requires:
      Required-by:

      Name: boto3
      Version: 1.34.144
      Summary: The AWS SDK for Python
      Home-page: https://github.com/boto/boto3
      Author: Amazon Web Services
      Author-email:
      License: Apache License 2.0
      Location: /home/myuser/ansible-10.1.0/lib/python3.11/site-packages
      Requires: botocore, jmespath, s3transfer
      Required-by:

      Name: botocore
      Version: 1.34.144
      Summary: Low-level, data-driven core of boto 3.
      Home-page: https://github.com/boto/botocore
      Author: Amazon Web Services
      Author-email:
      License: Apache License 2.0
      Location: /home/myuser/ansible-10.1.0/lib/python3.11/site-packages
      Requires: jmespath, python-dateutil, urllib3
      Required-by: boto3, s3transfer

          1. Configuration

      CONFIG_FILE() = /etc/ansible/ansible.cfg
      DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 50
      DEFAULT_VAULT_PASSWORD_FILE(/etc/ansible/ansible.cfg) = /home/myuser/.vaultPassword
      INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_silent
      PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 10
      PERSISTENT_CONNECT_RETRY_TIMEOUT(/etc/ansible/ansible.cfg) = 30
      PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 30

          1. OS / Environment

      RHEL8

          1. Steps to Reproduce
      • hosts: '{{ host }}'
        gather_facts: no
        ignore_unreachable: true
        tasks:
      • name : Stop database
        block:
      • name: "Assume role"
        community.aws.sts_assume_role:
        role_arn: "{{ aws_role_to_assume }}"
        role_session_name: test-rds
        register : assumed_role
        delegate_to: localhost
      • name: "Stop the DB {{ aws_rds_cluster_id }}"
        amazon.aws.rds_cluster:
        aws_access_key: "{{ assumed_role.sts_creds.access_key }}"
        aws_secret_key: "{{ assumed_role.sts_creds.secret_key }}"
        session_token: "{{ assumed_role.sts_creds.session_token }}"
        db_cluster_identifier: "{{ aws_rds_cluster_id }}"
        region: "{{ aws_region }}"
        state: stopped
        apply_immediately: true
        delegate_to: localhost
        tags: ['stopdb', 'restartdb']
          1. Expected Results

      i expect the database to stop

          1. Actual Results

      An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Unknown parameter in input: "ApplyImmediately", must be one of: DBClusterIdentifier
      [WARNING]: Module did not set no_log for force_update_password
      fatal: [rds-mydb-tst -> localhost]: FAILED! => {"boto3_version": "1.34.144", "botocore_version": "1.34.144", "changed": false, "msg": "Unexpected failure for method stop_db_cluster with parameters

      {'BackupRetentionPeriod': 1, 'DBClusterIdentifier': 'aurpostdb-mydb-devtest1', 'ApplyImmediately': True}

      : Parameter validation failed:\nUnknown parameter in input: \"BackupRetentionPeriod\", must be one of: DBClusterIdentifier\nUnknown parameter in input: \"ApplyImmediately\", must be one of: DBClusterIdentifier"}

          1. Code of Conduct
      • [X] I agree to follow the Ansible Code of Conduct

            mandkulk@redhat.com Mandar Kulkarni
            jrouleau Jill Rouleau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: