Skip to content

Commit

Permalink
Merge pull request #2 from Samseppiol/master
Browse files Browse the repository at this point in the history
Convert component to use new cfndsl yaml constant syntax
  • Loading branch information
Guslington authored Jan 13, 2020
2 parents 577f85a + 3668e4e commit 163da07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions s3-cloudfront.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
]
}

if defined? bucket_policy

bucket_policy = external_parameters.fetch(bucket_policy, {})
bucket_policy.each do |sid, statement_config|
statement = {}
statement["Sid"] = sid
Expand All @@ -26,11 +26,9 @@
policy_document[:Statement] << statement
end

end


S3_Bucket('Bucket') do
BucketName FnSub(bucket_name)
BucketName FnSub(external_parameters[:bucket_name])
end

S3_BucketPolicy("BucketPolicy") do
Expand Down

0 comments on commit 163da07

Please sign in to comment.