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.
This commit is contained in:
parent
bf9077bfad
commit
e45e25c257
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue