Repository: getmoto/moto

Issue:
RDS responses don't return DBInstanceArn
RDS/RDS2 endpoints such as `create_db_instance`, `describe_db_instances`, etc. do not return the DBInstanceArn attribute in the response.

This makes it difficult to use moto when attempting to test the following code:

```
import boto3

rds_conn = boto3.client('rds')
for instance in rds_conn.describe_db_instances()['DBInstances']:
    for tag in rds_conn.list_tags_for_resource(ResourceName=instance['DBInstanceArn'])['TagList']:
        print(tag)
```

Because `DBInstanceArn` isn't returned in the response from `describe_db_instances()`, it is difficult to test code that relies on listing tags for resources that are listing (unless constructing the ARN based on user input).

This is present in moto==0.4.31


Discussion:

Resolving patch:
diff --git a/moto/rds/models.py b/moto/rds/models.py
--- a/moto/rds/models.py
+++ b/moto/rds/models.py
@@ -71,6 +71,11 @@ def __init__(self, **kwargs):
         # DBParameterGroupName
         # VpcSecurityGroupIds.member.N
 
+    @property
+    def db_instance_arn(self):
+        return "arn:aws:rds:{0}:1234567890:db:{1}".format(
+            self.region, self.db_instance_identifier)
+
     @property
     def physical_resource_id(self):
         return self.db_instance_identifier
@@ -231,6 +236,7 @@ def to_xml(self):
                 <Address>{{ database.address }}</Address>
                 <Port>{{ database.port }}</Port>
               </Endpoint>
+              <DBInstanceArn>{{ database.db_instance_arn }}</DBInstanceArn>
             </DBInstance>""")
         return template.render(database=self)
 
diff --git a/moto/rds2/models.py b/moto/rds2/models.py
--- a/moto/rds2/models.py
+++ b/moto/rds2/models.py
@@ -95,6 +95,11 @@ def __init__(self, **kwargs):
         self.character_set_name = kwargs.get('character_set_name', None)
         self.tags = kwargs.get('tags', [])
 
+    @property
+    def db_instance_arn(self):
+        return "arn:aws:rds:{0}:1234567890:db:{1}".format(
+            self.region, self.db_instance_identifier)
+
     @property
     def physical_resource_id(self):
         return self.db_instance_identifier
@@ -206,6 +211,7 @@ def to_xml(self):
                 <Address>{{ database.address }}</Address>
                 <Port>{{ database.port }}</Port>
               </Endpoint>
+              <DBInstanceArn>{{ database.db_instance_arn }}</DBInstanceArn>
             </DBInstance>""")
         return template.render(database=self)
 
@@ -349,7 +355,8 @@ def to_json(self):
                 "Status": "active",
                 "VpcSecurityGroupId": "sg-123456"
             }
-        ]
+        ],
+        "DBInstanceArn": "{{ database.db_instance_arn }}"
       }""")
         return template.render(database=self)
 


Test patch:
diff --git a/tests/test_rds2/test_rds2.py b/tests/test_rds2/test_rds2.py
--- a/tests/test_rds2/test_rds2.py
+++ b/tests/test_rds2/test_rds2.py
@@ -26,6 +26,8 @@ def test_create_database():
     database['DBInstance']['MasterUsername'].should.equal("root")
     database['DBInstance']['DBSecurityGroups'][0][
         'DBSecurityGroupName'].should.equal('my_sg')
+    database['DBInstance']['DBInstanceArn'].should.equal(
+        'arn:aws:rds:us-west-2:1234567890:db:db-master-1')
 
 
 @disable_on_py3()
@@ -59,6 +61,8 @@ def test_get_databases():
     list(instances['DBInstances']).should.have.length_of(1)
     instances['DBInstances'][0][
         'DBInstanceIdentifier'].should.equal("db-master-1")
+    instances['DBInstances'][0]['DBInstanceArn'].should.equal(
+        'arn:aws:rds:us-west-2:1234567890:db:db-master-1')
 
 
 @disable_on_py3()
@@ -333,26 +337,27 @@ def test_list_tags_db():
     result = conn.list_tags_for_resource(
         ResourceName='arn:aws:rds:us-west-2:1234567890:db:foo')
     result['TagList'].should.equal([])
-    conn.create_db_instance(DBInstanceIdentifier='db-with-tags',
-                            AllocatedStorage=10,
-                            DBInstanceClass='postgres',
-                            Engine='db.m1.small',
-                            MasterUsername='root',
-                            MasterUserPassword='hunter2',
-                            Port=1234,
-                            DBSecurityGroups=['my_sg'],
-                            Tags=[
-                                {
-                                    'Key': 'foo',
-                                    'Value': 'bar',
-                                },
-                                {
-                                    'Key': 'foo1',
-                                    'Value': 'bar1',
-                                },
-                            ])
+    test_instance = conn.create_db_instance(
+        DBInstanceIdentifier='db-with-tags',
+        AllocatedStorage=10,
+        DBInstanceClass='postgres',
+        Engine='db.m1.small',
+        MasterUsername='root',
+        MasterUserPassword='hunter2',
+        Port=1234,
+        DBSecurityGroups=['my_sg'],
+        Tags=[
+            {
+                'Key': 'foo',
+                'Value': 'bar',
+            },
+            {
+                'Key': 'foo1',
+                'Value': 'bar1',
+            },
+        ])
     result = conn.list_tags_for_resource(
-        ResourceName='arn:aws:rds:us-west-2:1234567890:db:db-with-tags')
+        ResourceName=test_instance['DBInstance']['DBInstanceArn'])
     result['TagList'].should.equal([{'Value': 'bar',
                                      'Key': 'foo'},
                                     {'Value': 'bar1',