8000 Remove conditions and parameters from stack resources (#8681) · codeperl/localstack@d0d4436 · GitHub
[go: up one dir, main page]

Skip to content

Commit d0d4436

Browse files
Remove conditions and parameters from stack resources (localstack#8681)
1 parent 3c1c27d commit d0d4436

File tree

6 files changed

+273
-141
lines changed

6 files changed

+273
-141
lines changed

localstack/services/cloudformation/engine/entities.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from localstack.services.cloudformation.engine.parameters import (
66
StackParameter,
77
convert_stack_parameters_to_list,
8-
map_to_legacy_structure,
98
strip_parameter_type,
109
)
1110
from localstack.utils.aws import arns
@@ -244,26 +243,10 @@ def stack_name(self):
244243
def stack_id(self):
245244
return self.metadata["StackId"]
246245

247-
# TODO: potential performance issues due to many stack_parameters calls (cache or limit actual invocations)
248246
@property
249-
def resources(self): # TODO: not actually resources, split apart
250-
"""Return dict of resources, parameters, conditions, and other stack metadata."""
251-
result = dict(self.template_resources)
252-
253-
result.update(
254-
{k: map_to_legacy_structure(k, v) for k, v in self.resolved_parameters.items()}
255-
)
256-
257-
# TODO: conditions don't really belong here and should be handled separately
258-
for name, value in self.conditions.items():
259-
if name not in result:
260-
result[name] = {
261-
"Type": "Parameter",
262-
"LogicalResourceId": name,
263-
"Properties": {"Value": value},
264-
}
265-
266-
return result
247+
def resources(self):
248+
"""Return dict of resources"""
249+
return dict(self.template_resources)
267250

268251
@property
269252
def template_resources(self):

0 commit comments

Comments
 (0)
0