Skip to content

Commit c48faa8

Browse files
committed
only output outputs if present
1 parent b111505 commit c48faa8

File tree

1 file changed

+6
-4
lines changed
  • localstack-core/localstack/services/cloudformation/v2

1 file changed

+6
-4
lines changed

localstack-core/localstack/services/cloudformation/v2/entities.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def set_stack_status(self, status: StackStatus, reason: StackStatusReason | None
9494
self.status_reason = reason
9595

9696
def describe_details(self) -> ApiStack:
97-
return {
97+
result = {
9898
"CreationTime": self.creation_time,
9999
"StackId": self.stack_id,
100100
"StackName": self.stack_name,
@@ -109,13 +109,15 @@ def describe_details(self) -> ApiStack:
109109
"LastUpdatedTime": self.creation_time,
110110
"RollbackConfiguration": {},
111111
"Tags": [],
112-
"Outputs": [
112+
}
113+
if self.resolved_outputs:
114+
result["Outputs"] = [
113115
# TODO(parity): Description, ExportName
114116
# TODO(parity): what happens on describe stack when the stack has not been deployed yet?
115117
{"OutputKey": k, "OutputValue": v}
116118
for k, v in self.resolved_outputs.items()
117-
],
118-
}
119+
]
120+
return result
119121

120122

121123
class ChangeSet:

0 commit comments

Comments
 (0)