Skip to content

Commit

Permalink
Merge pull request #12 from theonestack/managed_iam_policies
Browse files Browse the repository at this point in the history
adds support for managed polices
  • Loading branch information
Guslington authored Mar 2, 2020
2 parents cc5913f + 2d35c26 commit 6681507
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bastion.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@
iam_policies.each do |name,policy|
policies << iam_policy_allow(name,policy['action'],policy['resource'] || '*')
end if defined? iam_policies

managed_iam_policies = external_parameters.fetch(:managed_iam_policies, [])

Role('Role') do
AssumeRolePolicyDocument service_role_assume_policy(iam_services)
Path '/'
ManagedPolicyArns managed_iam_policies if managed_iam_policies.any?
Policies(policies)
Metadata({
cfn_nag: {
Expand Down

0 comments on commit 6681507

Please sign in to comment.