-
Notifications
You must be signed in to change notification settings - Fork 24
Description
I was seeing an issue where the function was failing for an Aurora DB cluster with a configuration like:
Cluster Name: Test-Cluster
Instance Name: Test-DB
When the build_arn_for_id function returns for the cluster, It returns an arn of...
arn:aws:rds:us-east-1:xxxxxxxxxxx:db:test-cluster
...which it cannot find because it doesn't exist. The build_arn_for_id function has a return of...
return "arn:aws:rds:{0}:{1}:db:{2}".format(region, account_number, instance_id)
...with db hard coded in the in the arn string but the input can be a cluster id. For testing purposes, I added a param and conditional to the function to make that variable.
return "arn:aws:rds:{0}:{1}:{2}:{3}".format(region, account_number, rds_type, instance_id)
This seems to resolve the issues and I did some basic testing with a Aurora Cluster and a MySQL database and everything seems to function as expected.
I've only been working with Python (and this function and associated libraries) for a few days so I'm not very comfortable submitting this as a formal pull request in case I'm missing some deeper functionality I haven't come across yet.
I also noticed there were some changes to get_resource_tags merged in recently which happen directly before this call and gets the ID passed to it. I'm not sure if that change affected this. I didn't attempt to pull the prior version and test it.
-Jeff