diff --git a/lib/ansible/modules/cloud/amazon/rds.py b/lib/ansible/modules/cloud/amazon/rds.py index ff441b4045..3c02d1f4fd 100644 --- a/lib/ansible/modules/cloud/amazon/rds.py +++ b/lib/ansible/modules/cloud/amazon/rds.py @@ -780,7 +780,8 @@ class RDSDBInstance: d["endpoint"] = None d["port"] = None d["vpc_security_groups"] = None - + if self.instance.DBName: + d['DBName'] = self.instance.DBName # ReadReplicaSourceDBInstanceIdentifier may or may not exist try: d["replication_source"] = self.instance.ReadReplicaSourceDBInstanceIdentifier @@ -873,7 +874,8 @@ class RDS2DBInstance: else: d['endpoint'] = None d['port'] = None - + if self.instance["DBName"]: + d['DBName'] = self.instance['DBName'] return d