Skip to content

Commit 9d68635

Browse files
committed
Call set_outputs in diff command
1 parent 7fccbc6 commit 9d68635

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

stacker/actions/diff.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,12 @@ def _diff_stack(self, stack, **kwargs):
212212
if not build.should_update(stack):
213213
return NotUpdatedStatus()
214214

215+
provider_stack = self.provider.get_stack(stack.fqn)
216+
215217
# get the current stack template & params from AWS
216218
try:
217219
[old_template, old_params] = self.provider.get_stack_info(
218-
stack.fqn)
220+
provider_stack)
219221
except exceptions.StackDoesNotExist:
220222
old_template = None
221223
old_params = {}
@@ -249,6 +251,9 @@ def _diff_stack(self, stack, **kwargs):
249251
)
250252
print_stack_changes(stack.name, new_stack, old_stack, new_params,
251253
old_params)
254+
255+
self.provider.set_outputs(stack.fqn, provider_stack)
256+
252257
return COMPLETE
253258

254259
def _generate_plan(self):

stacker/providers/aws/default.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,12 +900,12 @@ def set_outputs(self, stack_name, stack):
900900
self._outputs[stack_name] = get_output_dict(stack)
901901
return
902902

903-
def get_stack_info(self, stack_name):
903+
def get_stack_info(self, stack):
904904
""" Get the template and parameters of the stack currently in AWS
905905
906906
Returns [ template, parameters ]
907907
"""
908-
stack = self.get_stack(stack_name)
908+
stack_name = stack['StackId']
909909

910910
try:
911911
template = self.cloudformation.get_template(

0 commit comments

Comments
 (0)