Skip to content

Commit

Permalink
Merge pull request #590 from amplify-education/hotfix/update-cloudfor…
Browse files Browse the repository at this point in the history
…mation-exports

Fix cloudformation export names
  • Loading branch information
rddimon committed Jul 24, 2023
2 parents ebee6fd + 5363756 commit 916a231
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [7.1.1] - 2023-07-24

### Fixed
- Fixed compiledCloudFormationTemplate export names for the custom stages.

## [7.1.0] - 2023-07-18

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Expand Up @@ -463,8 +463,9 @@ class ServerlessCustomDomain {
hostedZoneIdOutputKey += "Websocket";
}

// for the CloudFormation stack we should use the `base` stage not the plugin custom stage
// Remove all special characters
const safeStage = domain.stage.replace(/[^a-zA-Z\d]/g, "");
const safeStage = Globals.getBaseStage().replace(/[^a-zA-Z\d]/g, "");
service.provider.compiledCloudFormationTemplate.Outputs[domainNameOutputKey] = {
Value: domain.givenDomainName,
Export: {
Expand Down

0 comments on commit 916a231

Please sign in to comment.