Skip to content

Commit

Permalink
Update capabilities to support named iam (#210)
Browse files Browse the repository at this point in the history
Updated create and update stack to support all possibile IAM
capabilities.

From AWS docs: If you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If you don't specify this parameter, this action returns an InsufficientCapabilities error.
  • Loading branch information
jfarrell authored and askreet committed Mar 6, 2017
1 parent 91bfc98 commit ee0282b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/moonshot/stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def create_stack
cf_client.create_stack(
stack_name: @name,
template_body: template.body,
capabilities: ['CAPABILITY_IAM'],
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM),
parameters: @config.parameters.values.map(&:to_cf),
tags: make_tags
)
Expand All @@ -200,7 +200,7 @@ def new_change_set
description: "Moonshot update command for application '#{Moonshot.config.app_name}'",
stack_name: @name,
template_body: template.body,
capabilities: ['CAPABILITY_IAM'],
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM),
parameters: @config.parameters.values.map(&:to_cf)
)

Expand Down
2 changes: 1 addition & 1 deletion spec/moonshot/stack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
{ key: 'ah_stage', value: 'rspec-app-staging' }
],
parameters: [],
capabilities: ['CAPABILITY_IAM']
capabilities: ['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM']
}
end

Expand Down

0 comments on commit ee0282b

Please sign in to comment.