diff --git a/moto/ssm/models.py b/moto/ssm/models.py index 878ffb284..2902fd04c 100644 --- a/moto/ssm/models.py +++ b/moto/ssm/models.py @@ -349,6 +349,10 @@ class Parameter(CloudFormationModel): ssm_backend.delete_parameter(properties.get("Name")) + @property + def physical_resource_id(self) -> str: + return self.name + MAX_TIMEOUT_SECONDS = 3600 diff --git a/tests/test_cloudformation/test_cloudformation_stack_integration.py b/tests/test_cloudformation/test_cloudformation_stack_integration.py index 2cb9063dd..35f023da7 100644 --- a/tests/test_cloudformation/test_cloudformation_stack_integration.py +++ b/tests/test_cloudformation/test_cloudformation_stack_integration.py @@ -1730,6 +1730,10 @@ def test_ssm_parameter(): waiter = cfn.get_waiter("stack_create_complete") waiter.wait(StackName=stack_name) + stack_resources = cfn.list_stack_resources(StackName=stack_name) + ssm_resource = stack_resources.get("StackResourceSummaries")[0] + ssm_resource.get("PhysicalResourceId").should.equal("test_ssm") + ssm_client = boto3.client("ssm", region_name="us-west-2") parameters = ssm_client.get_parameters(Names=["test_ssm"], WithDecryption=False)[ "Parameters"