diff --git a/moto/cloudformation/responses.py b/moto/cloudformation/responses.py index b2daa6141..e561bd876 100644 --- a/moto/cloudformation/responses.py +++ b/moto/cloudformation/responses.py @@ -367,7 +367,7 @@ class CloudFormationResponse(BaseResponse): new_params = self._get_param_values(incoming_params, old_stack.parameters) if old_stack.template == stack_body and old_stack.parameters == new_params: raise ValidationError( - old_stack.name, message=f"Stack [{old_stack.name}] already exists" + old_stack.name, message="No updates are to be performed." ) def _validate_status(self, stack: FakeStack) -> None: diff --git a/tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py b/tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py index 0926f0928..d6e28a97a 100644 --- a/tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py +++ b/tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py @@ -1258,7 +1258,7 @@ def test_update_stack_fail_update_same_template_body(): exp_metadata = exp.value.response.get("ResponseMetadata") exp_err.get("Code").should.equal("ValidationError") - exp_err.get("Message").should.equal(f"Stack [{name}] already exists") + exp_err.get("Message").should.equal("No updates are to be performed.") exp_metadata.get("HTTPStatusCode").should.equal(400) cf_conn.update_stack(