Skip to content

Commit

Permalink
Merge pull request #442 from nalbion/patch-1
Browse files Browse the repository at this point in the history
Export Domain & Distribution
  • Loading branch information
rddimon authored Jan 17, 2022
2 parents 2db7832 + 964c63c commit 8921f9f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,15 +612,24 @@ class ServerlessCustomDomain {

service.provider.compiledCloudFormationTemplate.Outputs[distributionDomainNameOutputKey] = {
Value: domain.domainInfo.domainName,
Export: {
Name: `sls-${service.service}-${domain.stage}-${distributionDomainNameOutputKey}`,
},
};

service.provider.compiledCloudFormationTemplate.Outputs[domainNameOutputKey] = {
Value: domain.givenDomainName,
Export: {
Name: `sls-${service.service}-${domain.stage}-${domainNameOutputKey}`,
},
};

if (domain.domainInfo.hostedZoneId) {
service.provider.compiledCloudFormationTemplate.Outputs[hostedZoneIdOutputKey] = {
Value: domain.domainInfo.hostedZoneId,
Export: {
Name: `sls-${service.service}-${domain.stage}-${hostedZoneIdOutputKey}`,
},
};
}
}
Expand Down

0 comments on commit 8921f9f

Please sign in to comment.