Tom Paine
bb5a1f7440
Add RDS cluster info to EC2 dynamic inventory
...
Add db_clusters to the ec2 inventory. Show tags. Only show clusters
matching tags in the `.ini`. Set `include_rds_clusters = True` option to
enable RDS cluster inventory collection.
Example inventory output:
```
{
"db_clusters": {
"ryansb-cluster-test": {
"AllocatedStorage": 1,
"AvailabilityZones": [
"us-west-2a",
"us-west-2b",
"us-west-2c"
],
"BackupRetentionPeriod": 1,
"DBClusterIdentifier": "ryansb-cluster-test",
"DBClusterMembers": [
{
"DBClusterParameterGroupStatus": "in-sync",
"DBInstanceIdentifier": "ryansb-test",
"IsClusterWriter": true,
"PromotionTier": 1
},
{
"DBClusterParameterGroupStatus": "in-sync",
"DBInstanceIdentifier": "ryansb-test-us-west-2b",
"IsClusterWriter": false,
"PromotionTier": 1
}
],
"DBClusterParameterGroup": "default.aurora5.6",
"DBSubnetGroup": "default",
"DatabaseName": "mydb",
"DbClusterResourceId": "cluster-OB6H7JQURFKFD4BYNHG5HSRLBA",
"Endpoint": "ryansb-cluster-test.cluster-c9ntgaejgqln.us-west-2.rds.amazonaws.com",
"Engine": "aurora",
"EngineVersion": "5.6.10a",
"MasterUsername": "admin",
"Port": 3306,
"PreferredBackupWindow": "06:09-06:39",
"PreferredMaintenanceWindow": "mon:11:22-mon:11:52",
"ReadReplicaIdentifiers": [],
"Status": "available",
"StorageEncrypted": false,
"VpcSecurityGroups": [
{
"Status": "active",
"VpcSecurityGroupId": "sg-47eaea20"
}
]
}
},
"rds": [
"ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com",
"ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"rds_aurora": [
"ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com",
"ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"rds_parameter_group_default_aurora5_6": [
"ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com",
"ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"ryansb-test": [
"ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"ryansb-test-us-west-2b": [
"ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"type_db_r3_large": [
"ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com",
"ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"us-west-2": [
"ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com",
"ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"us-west-2a": [
"ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"us-west-2b": [
"ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
],
"vpc_id_vpc_3ca34459": [
"ryansb_test_c9ntgaejgqln_us_west_2_rds_amazonaws_com",
"ryansb_test_us_west_2b_c9ntgaejgqln_us_west_2_rds_amazonaws_com"
]
}
```
2016-07-06 10:57:31 -04:00