Module: Sfn::MonkeyPatch::Stack::Azure
- Included in:
- Sfn::MonkeyPatch::Stack
- Defined in:
- lib/sfn/monkey_patch/stack/azure.rb
Overview
Azure specific monkey patch implementations
Instance Method Summary collapse
-
#sparkleish_template_azure ⇒ Hash
Restructured azure template.
Instance Method Details
#sparkleish_template_azure ⇒ Hash
Note:
Will return #template if name collision encountered within resources
Returns restructured azure template.
11 12 13 14 15 16 17 18 |
# File 'lib/sfn/monkey_patch/stack/azure.rb', line 11 def sparkleish_template_azure new_template = template.to_smash resources = new_template.delete(:resources) resources.each do |resource| new_template.set(:resources, resource.delete(:name), resource) end resources.size == new_template[:resources].size ? new_template : template end |