diff --git a/changelogs/fragments/rds_global_cluster_info.yml b/changelogs/fragments/rds_global_cluster_info.yml deleted file mode 100644 index ec75676bb5e..00000000000 --- a/changelogs/fragments/rds_global_cluster_info.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - Add rds_global_cluster_info module to get information Aurora gloabl db clusters. diff --git a/plugins/modules/rds_global_cluster_info.py b/plugins/modules/rds_global_cluster_info.py index d7adabc8fc7..1c4d3397129 100644 --- a/plugins/modules/rds_global_cluster_info.py +++ b/plugins/modules/rds_global_cluster_info.py @@ -56,7 +56,7 @@ type: list contains: global_cluster_identifier: - description: User-supplied global database cluster identifier.. + description: User-supplied global database cluster identifier. type: str sample: "ansible-test-global-cluster" global_cluster_resource_id: @@ -125,7 +125,7 @@ contains: status: description: - - The current status of the global cluster. Possible values are as follows + - The current status of the global cluster. type: str sample: "pending" from_db_cluster_arn: diff --git a/tests/integration/targets/rds_global_cluster_create/tasks/main.yaml b/tests/integration/targets/rds_global_cluster_create/tasks/main.yaml index 62be88d7af5..c0a09c62c4e 100644 --- a/tests/integration/targets/rds_global_cluster_create/tasks/main.yaml +++ b/tests/integration/targets/rds_global_cluster_create/tasks/main.yaml @@ -71,12 +71,26 @@ - global_cluster_info.global_clusters[0].global_cluster_members[1].db_cluster_arn == secondary_cluster_info_result.clusters[0].db_cluster_arn - global_cluster_info.global_clusters[0].engine == engine + - name: Get Global DB information + amazon.aws.rds_global_cluster_info: + filters: + engine: "{{ engine }}" + region: "{{ aws_region }}" + register: global_cluster_filter_info + + - name: Assert that the filter result is as expected + ansible.builtin.assert: + that: + - global_cluster_info.global_clusters[0] == item + when: item.global_cluster_identifier == global_cluster_id + loop: "{{ global_cluster_filter_info.global_clusters }}" + always: - name: Delete secondary cluster without creating a final snapshot amazon.aws.rds_cluster: cluster_id: "{{ secondary_cluster_id }}" region: "eu-north-1" - global_cluster_identifier: "{{ obal_cluster_id }}" + global_cluster_identifier: "{{ global_cluster_id }}" remove_from_global_db: true skip_final_snapshot: True state: absent @@ -84,7 +98,7 @@ - name: Delete instance attached to primary uster amazon.aws.rds_instance: - db_instance_identifier: "{{ imary_instance_id }}" + db_instance_identifier: "{{ primary_instance_id }}" region: "{{ aws_region }}" skip_final_snapshot: true wait: false @@ -94,16 +108,15 @@ - name: Delete primary cluster without creating a nal snapshot amazon.aws.rds_cluster: cluster_id: "{{ primary_cluster_id }}" - lobal_cluster_identifier: "{{ obal_cluster_id }}" + global_cluster_identifier: "{{ global_cluster_id }}" skip_final_snapshot: True region: "{{ aws_region }}" state: absent ignore_errors: true - - name: Delete DB cluster without creating a final snapshot - amazon.aws.rds_cluster: + - name: Delete Global DB cluster + amazon.cloud.rds_global_cluster: state: absent - cluster_id: "{{ global_cluster_id }}" - skip_final_snapshot: true + global_cluster_identifier: "{{ global_cluster_id }}" region: "{{ aws_region }}" ignore_errors: true