SSM: Implement physical_resource_id property (#6370)

This commit is contained in:
Jonathan Bell 2023-06-07 05:48:06 -04:00 committed by GitHub
parent 5e89ceee69
commit 491f26f37a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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"