Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom export names #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions s3.cfndsl.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
CloudFormation do

export = external_parameters.fetch(:export_name, external_parameters[:component_name])

buckets = external_parameters.fetch(:buckets, {})
buckets.each do |bucket, config|

Expand Down Expand Up @@ -169,7 +171,7 @@
Output(safe_bucket_name) { Value(Ref(safe_bucket_name)) }
Output(safe_bucket_name + 'DomainName') do
Value FnGetAtt(safe_bucket_name, 'DomainName')
Export FnSub("${EnvironmentName}-#{safe_bucket_name}-domain-name")
Export FnSub("${EnvironmentName}-#{export}-#{safe_bucket_name}-domain-name")
end

if origin_access_identity
Expand All @@ -181,7 +183,7 @@

Output("#{safe_bucket_name}OriginAccessIdentity") do
Value Ref("#{safe_bucket_name}OriginAccessIdentity")
Export FnSub("${EnvironmentName}-#{safe_bucket_name}-origin-access-identity")
Export FnSub("${EnvironmentName}-#{export}-#{safe_bucket_name}-origin-access-identity")
end
end

Expand Down
Loading