Skip to content
Snippets Groups Projects
Commit 8d299e55 authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

rettet et par feil, fjernet condition

parent f6766fd9
No related branches found
No related tags found
No related merge requests found
...@@ -31,9 +31,7 @@ Parameters: ...@@ -31,9 +31,7 @@ Parameters:
Type: String Type: String
Default: '' Default: ''
Conditions:
UseDomain: !Not [!Or [!Equals [!Ref DomainName, ''], !Equals [!Ref CertificateArn, '']]]
############################################################################### ###############################################################################
Resources: Resources:
...@@ -41,7 +39,6 @@ Resources: ...@@ -41,7 +39,6 @@ Resources:
DNS: DNS:
Type: "AWS::Route53::RecordSet" Type: "AWS::Route53::RecordSet"
Condition: UseDomain
Properties: Properties:
HostedZoneConfig: HostedZoneConfig:
Comment: !Join ['', ['Hosted zone for ', !Ref 'DomainName']] Comment: !Join ['', ['Hosted zone for ', !Ref 'DomainName']]
...@@ -80,7 +77,7 @@ Resources: ...@@ -80,7 +77,7 @@ Resources:
- Sid: PublicReadForGetBucketObjects - Sid: PublicReadForGetBucketObjects
Effect: Allow Effect: Allow
Action: s3:GetObject Action: s3:GetObject
Resource: !Join ['', ['arn:aws:s3:::', !Ref 'WebsiteBucket', /*]] Resource: !Join ['', ['arn:aws:s3:::', !Ref 'WebBucket', /*]]
Principal: Principal:
- CanonicalUser: !GetAtt CloudFrontOriginIdentity.S3CanonicalUserId - CanonicalUser: !GetAtt CloudFrontOriginIdentity.S3CanonicalUserId
...@@ -90,7 +87,6 @@ Resources: ...@@ -90,7 +87,6 @@ Resources:
ITAIpSet: ITAIpSet:
Type: "AWS::WAF::IPSet" Type: "AWS::WAF::IPSet"
Condition: UseDomain
Properties: Properties:
IPSetDescriptors: IPSetDescriptors:
- Type: "IPV4" - Type: "IPV4"
...@@ -102,7 +98,6 @@ Resources: ...@@ -102,7 +98,6 @@ Resources:
ITARule: ITARule:
Type: "AWS::WAF::Rule" Type: "AWS::WAF::Rule"
Condition: UseDomain
Properties: Properties:
MetricName: "ITARule" MetricName: "ITARule"
Name: "ITARule" Name: "ITARule"
...@@ -116,7 +111,6 @@ Resources: ...@@ -116,7 +111,6 @@ Resources:
ACL: ACL:
Type: "AWS::WAF::WebACL" Type: "AWS::WAF::WebACL"
Condition: UseDomain
Properties: Properties:
DefaultAction: DefaultAction:
Type: "BLOCK" Type: "BLOCK"
...@@ -133,13 +127,11 @@ Resources: ...@@ -133,13 +127,11 @@ Resources:
Distribution: Distribution:
Type: "AWS::CloudFront::Distribution" Type: "AWS::CloudFront::Distribution"
Condition: UseDomain
Properties: Properties:
DistributionConfig: DistributionConfig:
Enabled: true Enabled: true
HttpVersion: http2 HttpVersion: http2
PriceClass: !Ref PriceClass PriceClass: !Ref PriceClass
Enabled: 'true'
DefaultRootObject: index.html DefaultRootObject: index.html
Origins: Origins:
- DomainName: !Sub "${WebBucket}.s3-${AWS::Region}.amazonaws.com" - DomainName: !Sub "${WebBucket}.s3-${AWS::Region}.amazonaws.com"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment