From 8d299e55b4d8b361600ea320fe0d1a8c1ebae878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Volds=C3=A6ter?= <ole.voldsater@uib.no> Date: Tue, 11 Feb 2020 12:56:15 +0100 Subject: [PATCH] rettet et par feil, fjernet condition --- aws/beta.ordbok.uib.no_stack.yaml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/aws/beta.ordbok.uib.no_stack.yaml b/aws/beta.ordbok.uib.no_stack.yaml index e7939444..4486799c 100644 --- a/aws/beta.ordbok.uib.no_stack.yaml +++ b/aws/beta.ordbok.uib.no_stack.yaml @@ -31,9 +31,7 @@ Parameters: Type: String Default: '' - -Conditions: - UseDomain: !Not [!Or [!Equals [!Ref DomainName, ''], !Equals [!Ref CertificateArn, '']]] + ############################################################################### Resources: @@ -41,7 +39,6 @@ Resources: DNS: Type: "AWS::Route53::RecordSet" - Condition: UseDomain Properties: HostedZoneConfig: Comment: !Join ['', ['Hosted zone for ', !Ref 'DomainName']] @@ -80,7 +77,7 @@ Resources: - Sid: PublicReadForGetBucketObjects Effect: Allow Action: s3:GetObject - Resource: !Join ['', ['arn:aws:s3:::', !Ref 'WebsiteBucket', /*]] + Resource: !Join ['', ['arn:aws:s3:::', !Ref 'WebBucket', /*]] Principal: - CanonicalUser: !GetAtt CloudFrontOriginIdentity.S3CanonicalUserId @@ -90,7 +87,6 @@ Resources: ITAIpSet: Type: "AWS::WAF::IPSet" - Condition: UseDomain Properties: IPSetDescriptors: - Type: "IPV4" @@ -102,7 +98,6 @@ Resources: ITARule: Type: "AWS::WAF::Rule" - Condition: UseDomain Properties: MetricName: "ITARule" Name: "ITARule" @@ -116,7 +111,6 @@ Resources: ACL: Type: "AWS::WAF::WebACL" - Condition: UseDomain Properties: DefaultAction: Type: "BLOCK" @@ -133,13 +127,11 @@ Resources: Distribution: Type: "AWS::CloudFront::Distribution" - Condition: UseDomain Properties: DistributionConfig: Enabled: true HttpVersion: http2 PriceClass: !Ref PriceClass - Enabled: 'true' DefaultRootObject: index.html Origins: - DomainName: !Sub "${WebBucket}.s3-${AWS::Region}.amazonaws.com" -- GitLab