parent
60dd2f1fff
commit
4ac3b0c5d5
1 changed files with 5 additions and 5 deletions
|
@ -539,8 +539,8 @@ class RDSDBInstance:
|
||||||
'iops' : self.instance.iops
|
'iops' : self.instance.iops
|
||||||
}
|
}
|
||||||
|
|
||||||
# Endpoint exists only if the instance is available
|
# Only assign an Endpoint if one is available
|
||||||
if self.status == 'available':
|
if hasattr(self.instance, 'endpoint'):
|
||||||
d["endpoint"] = self.instance.endpoint[0]
|
d["endpoint"] = self.instance.endpoint[0]
|
||||||
d["port"] = self.instance.endpoint[1]
|
d["port"] = self.instance.endpoint[1]
|
||||||
if self.instance.vpc_security_groups is not None:
|
if self.instance.vpc_security_groups is not None:
|
||||||
|
@ -587,9 +587,9 @@ class RDS2DBInstance:
|
||||||
}
|
}
|
||||||
if self.instance["VpcSecurityGroups"] is not None:
|
if self.instance["VpcSecurityGroups"] is not None:
|
||||||
d['vpc_security_groups'] = ','.join(x['VpcSecurityGroupId'] for x in self.instance['VpcSecurityGroups'])
|
d['vpc_security_groups'] = ','.join(x['VpcSecurityGroupId'] for x in self.instance['VpcSecurityGroups'])
|
||||||
if self.status == 'available':
|
if "Endpoint" in self.instance and self.instance["Endpoint"] is not None:
|
||||||
d['endpoint'] = self.instance["Endpoint"]["Address"]
|
d['endpoint'] = self.instance["Endpoint"].get('Address', None)
|
||||||
d['port'] = self.instance["Endpoint"]["Port"]
|
d['port'] = self.instance["Endpoint"].get('Port', None)
|
||||||
else:
|
else:
|
||||||
d['endpoint'] = None
|
d['endpoint'] = None
|
||||||
d['port'] = None
|
d['port'] = None
|
||||||
|
|
Loading…
Reference in a new issue