Fix `cloudformation` error when stack-rollback fails (#5550)

In cases where a CFN stack could not complete (due to lack of
permissions or similar) but also failed to roll back, the gathering of
stack resources would fail because successfully deleted items in the
rollback would no longer have a `PhysicalResourceId` property.

This PR fixes that by soft-failing when there's no physical ID
associated to a resource.
pull/18777/head
Ryan Brown 8 years ago committed by Matt Clay
parent bf9077bfad
commit e45e25c257

@ -473,7 +473,7 @@ def main():
for res in reslist.get('StackResourceSummaries', []):
stack_resources.append({
"logical_resource_id": res['LogicalResourceId'],
"physical_resource_id": res['PhysicalResourceId'],
"physical_resource_id": res.get('PhysicalResourceId', ''),
"resource_type": res['ResourceType'],
"last_updated_time": res['LastUpdatedTimestamp'],
"status": res['ResourceStatus'],

Loading…
Cancel
Save