Paginate DB cluster responses in AWS RDS dynamic inventory

pull/16606/head
Ryan S. Brown 8 years ago
parent 59e499f8f0
commit 0783c172d7

@ -83,7 +83,7 @@ all_instances = False
all_rds_instances = False
# Include RDS cluster information (Aurora etc.)
include_rds_clusters = True
include_rds_clusters = False
# By default, only ElastiCache clusters and nodes in the 'available' state
# are returned. Set 'all_elasticache_clusters' and/or 'all_elastic_nodes'

@ -597,7 +597,13 @@ class Ec2Inventory(object):
"getting RDS clusters")
client = ec2_utils.boto3_inventory_conn('client', 'rds', region, **self.credentials)
clusters = client.describe_db_clusters()["DBClusters"]
marker, clusters = '', []
while marker is not None:
resp = client.describe_db_clusters(Marker=marker)
clusters.extend(resp["DBClusters"])
marker = resp.get('Marker', None)
account_id = boto.connect_iam().get_user().arn.split(':')[4]
c_dict = {}
for c in clusters:

Loading…
Cancel
Save