Skip to content

Commit cf0e1e6

Browse files
Fix custom domain name deployments
Deployments with custom domain names were failing because the output WebsiteURL referenced the (non-existant) DefaultCloudfrontDistribution.
1 parent 2bf3ef6 commit cf0e1e6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cloudformation/template.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,14 +1162,18 @@ Resources:
11621162

11631163
Outputs:
11641164
WebsiteURL:
1165-
Value: !Join ['', [ 'https://', !GetAtt DefaultCloudfrontDistribution.DomainName ]]
1166-
Description: URL for website hosted on S3
1165+
Value: !If [
1166+
UseCustomDomainName,
1167+
!Join ['', [ 'https://', !GetAtt CustomDomainCloudfrontDistribution.DomainName ]],
1168+
!Join ['', [ 'https://', !GetAtt DefaultCloudfrontDistribution.DomainName ]]
1169+
]
1170+
Description: CloudFront URL for website
11671171

11681172
DEPRECATEDS3WebsiteURL:
11691173
Value: !Join [ '', [ 'http://', !Ref DevPortalSiteS3BucketName, !FindInMap ['RegionSpecificConfig', !Ref 'AWS::Region', 's3Url'] ]]
1170-
Description: URL for website
1174+
Description: URL for website. Deprecated; this URL does not provide SSL / HTTPS, and will be made inaccessible in a later major version.
11711175

11721176
CustomWebsiteURL:
11731177
Condition: UseCustomDomainName
11741178
Value: !Ref CustomDomainName
1175-
Description: Custom URL for website hosted on S3, served through CloudFront
1179+
Description: Custom URL for website

0 commit comments

Comments
 (0)