Repository: getmoto/moto

Issue:
Add ResourceGroupsTaggingAPI Support for Aurora clusters
Currently moto seems to not support rds:cluster and only supports rds:db . This issues is to ask to add support to fetch the rds aurora clusters using ResourceGroupsTaggingAPI 


Discussion:
Marking it as an enhancement @ppapishe. Thanks for raising this, and welcome to Moto!

Resolving patch:
diff --git a/moto/resourcegroupstaggingapi/models.py b/moto/resourcegroupstaggingapi/models.py
--- a/moto/resourcegroupstaggingapi/models.py
+++ b/moto/resourcegroupstaggingapi/models.py
@@ -326,6 +326,21 @@ def get_kms_tags(kms_key_id):
 
                 yield {"ResourceARN": f"{kms_key.arn}", "Tags": tags}
 
+        # RDS Cluster
+        if (
+            not resource_type_filters
+            or "rds" in resource_type_filters
+            or "rds:cluster" in resource_type_filters
+        ):
+            for cluster in self.rds_backend.clusters.values():
+                tags = cluster.get_tags()
+                if not tags or not tag_filter(tags):
+                    continue
+                yield {
+                    "ResourceARN": cluster.db_cluster_arn,
+                    "Tags": tags,
+                }
+
         # RDS Instance
         if (
             not resource_type_filters


Test patch:
diff --git a/tests/test_resourcegroupstaggingapi/test_resourcegroupstaggingapi.py b/tests/test_resourcegroupstaggingapi/test_resourcegroupstaggingapi.py
--- a/tests/test_resourcegroupstaggingapi/test_resourcegroupstaggingapi.py
+++ b/tests/test_resourcegroupstaggingapi/test_resourcegroupstaggingapi.py
@@ -422,6 +422,50 @@ def assert_response(response, expected_count, resource_type=None):
     assert_response(resp, 2)
 
 
+@mock_rds
+@mock_resourcegroupstaggingapi
+def test_get_resources_rds_clusters():
+    client = boto3.client("rds", region_name="us-west-2")
+    resources_tagged = []
+    resources_untagged = []
+    for i in range(3):
+        cluster = client.create_db_cluster(
+            DBClusterIdentifier=f"db-cluster-{i}",
+            Engine="postgres",
+            MasterUsername="admin",
+            MasterUserPassword="P@ssw0rd!",
+            CopyTagsToSnapshot=True if i else False,
+            Tags=[{"Key": "test", "Value": f"value-{i}"}] if i else [],
+        ).get("DBCluster")
+        snapshot = client.create_db_cluster_snapshot(
+            DBClusterIdentifier=cluster["DBClusterIdentifier"],
+            DBClusterSnapshotIdentifier=f"snapshot-{i}",
+        ).get("DBClusterSnapshot")
+        group = resources_tagged if i else resources_untagged
+        group.append(cluster["DBClusterArn"])
+        group.append(snapshot["DBClusterSnapshotArn"])
+
+    def assert_response(response, expected_count, resource_type=None):
+        results = response.get("ResourceTagMappingList", [])
+        results.should.have.length_of(expected_count)
+        for item in results:
+            arn = item["ResourceARN"]
+            arn.should.be.within(resources_tagged)
+            arn.should_not.be.within(resources_untagged)
+            if resource_type:
+                sure.this(f":{resource_type}:").should.be.within(arn)
+
+    rtapi = boto3.client("resourcegroupstaggingapi", region_name="us-west-2")
+    resp = rtapi.get_resources(ResourceTypeFilters=["rds"])
+    assert_response(resp, 4)
+    resp = rtapi.get_resources(ResourceTypeFilters=["rds:cluster"])
+    assert_response(resp, 2, resource_type="cluster")
+    resp = rtapi.get_resources(ResourceTypeFilters=["rds:cluster-snapshot"])
+    assert_response(resp, 2, resource_type="cluster-snapshot")
+    resp = rtapi.get_resources(TagFilters=[{"Key": "test", "Values": ["value-1"]}])
+    assert_response(resp, 2)
+
+
 @mock_lambda
 @mock_resourcegroupstaggingapi
 @mock_iam