Skip to content

Commit

Permalink
Merge pull request fog#566 from lostboy/master
Browse files Browse the repository at this point in the history
Cloudformation CreateStack should accept Capabilities array as option
  • Loading branch information
geemus committed Oct 17, 2011
2 parents f10397f + 9a4c815 commit a61be10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/fog/aws/requests/cloud_formation/create_stack.rb
Expand Up @@ -17,6 +17,8 @@ class Real
# * NotificationARNs<~Array>: List of SNS topics to publish events to
# * Parameters<~Hash>: Hash of providers to supply to template
# * TimeoutInMinutes<~Integer>: Minutes to wait before status is set to CREATE_FAILED
# * Capabilities<~Array>: List of capabilties the stack is granted. Currently CAPABILITY_IAM
# for allowing the creation of IAM resources
#
# ==== Returns
# * response<~Excon::Response>:
Expand Down Expand Up @@ -58,6 +60,10 @@ def create_stack(stack_name, options = {})
if options['TimeoutInMinutes']
params['TimeoutInMinutes'] = options['TimeoutInMinutes']
end

if options['Capabilities']
params.merge!(Fog::AWS.indexed_param("Capabilities.member", [*options['Capabilities']]))
end

request({
'Action' => 'CreateStack',
Expand Down

0 comments on commit a61be10

Please sign in to comment.