CloudFormation: Return Description field in Outputs (#7489)
This commit is contained in:
parent
be0e21fb6d
commit
fd21ccb5b7
@ -818,6 +818,7 @@ DESCRIBE_STACKS_TEMPLATE = """<DescribeStacksResponse>
|
|||||||
<member>
|
<member>
|
||||||
<OutputKey>{{ output.key }}</OutputKey>
|
<OutputKey>{{ output.key }}</OutputKey>
|
||||||
<OutputValue>{{ output.value }}</OutputValue>
|
<OutputValue>{{ output.value }}</OutputValue>
|
||||||
|
{% if output.description %}<Description>{{ output.description }}</Description>{% endif %}
|
||||||
</member>
|
</member>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</Outputs>
|
</Outputs>
|
||||||
|
@ -165,7 +165,11 @@ def test_create_custom_lambda_resource__verify_manual_request():
|
|||||||
stack = cf.describe_stacks(StackName=stack_id)["Stacks"][0]
|
stack = cf.describe_stacks(StackName=stack_id)["Stacks"][0]
|
||||||
assert stack["StackStatus"] == "CREATE_COMPLETE"
|
assert stack["StackStatus"] == "CREATE_COMPLETE"
|
||||||
assert stack["Outputs"] == [
|
assert stack["Outputs"] == [
|
||||||
{"OutputKey": "infokey", "OutputValue": "resultfromthirdpartysystem"}
|
{
|
||||||
|
"OutputKey": "infokey",
|
||||||
|
"OutputValue": "resultfromthirdpartysystem",
|
||||||
|
"Description": "A very important value",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
# AWSlambda will not have logged anything
|
# AWSlambda will not have logged anything
|
||||||
|
@ -764,7 +764,11 @@ def test_vpc_endpoint_creation():
|
|||||||
|
|
||||||
outputs = cf.describe_stacks(StackName=stack_name)["Stacks"][0]["Outputs"]
|
outputs = cf.describe_stacks(StackName=stack_name)["Stacks"][0]["Outputs"]
|
||||||
assert len(outputs) == 1
|
assert len(outputs) == 1
|
||||||
assert outputs[0] == {"OutputKey": "EndpointId", "OutputValue": vpc_endpoint_id}
|
assert outputs[0] == {
|
||||||
|
"OutputKey": "EndpointId",
|
||||||
|
"OutputValue": vpc_endpoint_id,
|
||||||
|
"Description": "Id of the endpoint created",
|
||||||
|
}
|
||||||
|
|
||||||
endpoint = ec2_client.describe_vpc_endpoints(VpcEndpointIds=[vpc_endpoint_id])[
|
endpoint = ec2_client.describe_vpc_endpoints(VpcEndpointIds=[vpc_endpoint_id])[
|
||||||
"VpcEndpoints"
|
"VpcEndpoints"
|
||||||
@ -836,6 +840,7 @@ def test_launch_template_create():
|
|||||||
assert outputs[0] == {
|
assert outputs[0] == {
|
||||||
"OutputKey": "LaunchTemplateId",
|
"OutputKey": "LaunchTemplateId",
|
||||||
"OutputValue": launch_template_id,
|
"OutputValue": launch_template_id,
|
||||||
|
"Description": "The ID of the created launch template",
|
||||||
}
|
}
|
||||||
|
|
||||||
launch_template = ec2.describe_launch_templates(
|
launch_template = ec2.describe_launch_templates(
|
||||||
|
@ -53,7 +53,11 @@ def test_create_simple_cluster__using_cloudformation():
|
|||||||
|
|
||||||
# Verify outputs
|
# Verify outputs
|
||||||
stack = cf.describe_stacks(StackName="teststack")["Stacks"][0]
|
stack = cf.describe_stacks(StackName="teststack")["Stacks"][0]
|
||||||
assert {"OutputKey": "ClusterId", "OutputValue": cluster_id} in stack["Outputs"]
|
assert {
|
||||||
|
"OutputKey": "ClusterId",
|
||||||
|
"OutputValue": cluster_id,
|
||||||
|
"Description": "Cluster info",
|
||||||
|
} in stack["Outputs"]
|
||||||
|
|
||||||
# Verify EMR Cluster
|
# Verify EMR Cluster
|
||||||
cl = emr.describe_cluster(ClusterId=cluster_id)["Cluster"]
|
cl = emr.describe_cluster(ClusterId=cluster_id)["Cluster"]
|
||||||
|
Loading…
Reference in New Issue
Block a user