diff --git a/moto/cloudformation/models.py b/moto/cloudformation/models.py index bbb1a0fd2..11b97aa34 100644 --- a/moto/cloudformation/models.py +++ b/moto/cloudformation/models.py @@ -103,8 +103,9 @@ class FakeStackSet(BaseModel): self.instances.delete(accounts, regions) - self._create_operation(operation_id=operation_id, action='DELETE', + operation = self._create_operation(operation_id=operation_id, action='DELETE', status='SUCCEEDED', accounts=accounts, regions=regions) + return operation def update_instances(self, accounts, regions, parameters, operation_id=None): if not operation_id: diff --git a/moto/cloudformation/responses.py b/moto/cloudformation/responses.py index 86eb3df0a..2c7f6b91a 100644 --- a/moto/cloudformation/responses.py +++ b/moto/cloudformation/responses.py @@ -368,10 +368,10 @@ class CloudFormationResponse(BaseResponse): stackset_name = self._get_param('StackSetName') accounts = self._get_multi_param('Accounts.member') regions = self._get_multi_param('Regions.member') - self.cloudformation_backend.delete_stack_instances(stackset_name, accounts, regions) + operation = self.cloudformation_backend.delete_stack_instances(stackset_name, accounts, regions) template = self.response_template(DELETE_STACK_INSTANCES_TEMPLATE) - return template.render() + return template.render(operation=operation) def describe_stack_set(self): stackset_name = self._get_param('StackSetName') @@ -806,7 +806,7 @@ LIST_STACK_INSTANCES_TEMPLATE = """ - d76a070d-279a-45f3-b9b4-example + {{ operation.OperationId }} e5325090-66f6-4ecd-a531-example