mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Include a CFN stack's resources in the result
This commit is contained in:
parent
3d45384aed
commit
aed7d903ee
1 changed files with 10 additions and 0 deletions
|
@ -377,6 +377,16 @@ def main():
|
||||||
for output in stack.outputs:
|
for output in stack.outputs:
|
||||||
stack_outputs[output.key] = output.value
|
stack_outputs[output.key] = output.value
|
||||||
result['stack_outputs'] = stack_outputs
|
result['stack_outputs'] = stack_outputs
|
||||||
|
stack_resources = []
|
||||||
|
for res in cfn.list_stack_resources(stack_name):
|
||||||
|
stack_resources.append({
|
||||||
|
"last_updated_time": res.last_updated_time,
|
||||||
|
"logical_resource_id": res.logical_resource_id,
|
||||||
|
"physical_resource_id": res.physical_resource_id,
|
||||||
|
"status": res.resource_status,
|
||||||
|
"status_reason": res.resource_status_reason,
|
||||||
|
"resource_type": res.resource_type })
|
||||||
|
result['stack_resources'] = stack_resources
|
||||||
|
|
||||||
# absent state is different because of the way delete_stack works.
|
# absent state is different because of the way delete_stack works.
|
||||||
# problem is it it doesn't give an error if stack isn't found
|
# problem is it it doesn't give an error if stack isn't found
|
||||||
|
|
Loading…
Reference in a new issue