Skip to content

Instantly share code, notes, and snippets.

@mattray
Created September 14, 2018 05:03
Show Gist options
  • Save mattray/09acceb9334c3c13fff6c6d5a3573944 to your computer and use it in GitHub Desktop.
Save mattray/09acceb9334c3c13fff6c6d5a3573944 to your computer and use it in GitHub Desktop.
begin
awsclient = Aws::CloudFormation::Client.new()
cfn = awsclient.list_stack_resources({ stack_name: "mattray-Fri-Chef-Demo-20180914T024057Z" }).to_hash
resources = {}
cfn[:stack_resource_summaries].each { |r| resources[r[:logical_resource_id]] = r[:physical_resource_id] }
rescue Exception => e
raise(e) unless @conf['profile'].check_mode
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment