RDS: Add DbInstancePort to create_db_instance Responses (#5478)

This commit is contained in:
Brian Pandola 2022-09-16 03:03:34 -07:00 committed by GitHub
parent c648c0f957
commit cba304afcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -598,6 +598,7 @@ class Database(CloudFormationModel):
<Address>{{ database.address }}</Address>
<Port>{{ database.port }}</Port>
</Endpoint>
<DbInstancePort>{{ database.port }}</DbInstancePort>
<DBInstanceArn>{{ database.db_instance_arn }}</DBInstanceArn>
<TagList>
{%- for tag in database.tags -%}

View File

@ -42,6 +42,8 @@ def test_create_database():
db_instance["VpcSecurityGroups"][0]["VpcSecurityGroupId"].should.equal("sg-123456")
db_instance["DeletionProtection"].should.equal(False)
db_instance["EnabledCloudwatchLogsExports"].should.equal(["audit", "error"])
db_instance["Endpoint"]["Port"].should.equal(1234)
db_instance["DbInstancePort"].should.equal(1234)
@mock_rds
@ -336,6 +338,8 @@ def test_get_databases():
instances = conn.describe_db_instances(DBInstanceIdentifier="db-master-2")
instances["DBInstances"][0]["DeletionProtection"].should.equal(True)
instances["DBInstances"][0]["Endpoint"]["Port"].should.equal(1234)
instances["DBInstances"][0]["DbInstancePort"].should.equal(1234)
@mock_rds