-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcloudfront.cfhighlander.rb
36 lines (27 loc) · 1.17 KB
/
cloudfront.cfhighlander.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
CfhighlanderTemplate do
Parameters do
ComponentParam 'EnvironmentName', 'dev', isGlobal: true
ComponentParam 'EnvironmentType', 'development', allowedValues: ['development','production'], isGlobal: true
ComponentParam 'DnsDomain', isGlobal: true
ComponentParam 'EnableLambdaFunctionAssociations', 'false', allowedValues: ['true', 'false']
origins.each do |id,config|
ComponentParam "#{id}OriginDomainName"
ComponentParam "#{id}OriginAccessIdentityInput", '' if config['source'] == 's3'
end if (defined? origins) && (origins.any?)
case ssl['type']
when 'acm'
ComponentParam 'AcmCertificateArn'
when 'iam'
ComponentParam 'IamCertificateArn'
end
ComponentParam 'PriceClass', 'PriceClass_All', allowedValues: ['PriceClass_All','PriceClass_200', 'PriceClass_100']
ComponentParam 'WebACL'
ComponentParam 'MinTTL', 0
ComponentParam 'MaxTTL', 31536000
ComponentParam 'DefaultTTL', 86400
if (defined? aliases_map) && (aliases_map.any?)
ComponentParam 'AliasMap', aliases_map.keys[0], allowedValues: aliases_map.map { |k,v| k }
end
ComponentParam 'OverrideAliases', ''
end
end