Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #132 from rapid7/fix/issue-129-better-support-assu…
Browse files Browse the repository at this point in the history
…me-role-policies

Fix #129 - Add an assume_role_policy DSL method to iam_role
  • Loading branch information
erran-r7 committed Jun 7, 2016
2 parents 51d0a7a + 0ec1e0d commit 7d238d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/convection/model/template/resource/aws_iam_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ module Template
module Resource
## Role DSL
module IAMRole
def assume_role_policy(policy_name, &block)
@trust_relationship = Model::Mixin::Policy.new(:name => policy_name, :template => @template)
trust_relationship.instance_exec(&block) if block
end

def policy(policy_name, &block)
add_policy = Model::Mixin::Policy.new(:name => policy_name, :template => @template)
add_policy.instance_exec(&block) if block
Expand Down

0 comments on commit 7d238d7

Please sign in to comment.