Fix: TagList missing in rds:DescribeDBInstance response (#3459)

Previously, tags were only available via rds:ListTagsForResource, but are now
included in the Create/DescribeDBInstance responses as of Botocore 1.18.17[1]

[1]: f29d23c53e (diff-d10722c0e1)

Fixes #3458
This commit is contained in:
Brian Pandola 2020-11-16 01:30:53 -08:00 committed by GitHub
commit d29475ed19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View file

@ -1749,3 +1749,21 @@ def test_create_db_snapshot_with_iam_authentication():
).get("DBSnapshot")
snapshot.get("IAMDatabaseAuthenticationEnabled").should.equal(True)
@mock_rds2
def test_create_db_instance_with_tags():
client = boto3.client("rds", region_name="us-west-2")
tags = [{"Key": "foo", "Value": "bar"}, {"Key": "foo1", "Value": "bar1"}]
db_instance_identifier = "test-db-instance"
resp = client.create_db_instance(
DBInstanceIdentifier=db_instance_identifier,
Engine="postgres",
DBName="staging-postgres",
DBInstanceClass="db.m1.small",
Tags=tags,
)
resp["DBInstance"]["TagList"].should.equal(tags)
resp = client.describe_db_instances(DBInstanceIdentifier=db_instance_identifier)
resp["DBInstances"][0]["TagList"].should.equal(tags)