Skip to content

Commit

Permalink
Merge pull request #2 from alma-cdk/fix-account-name
Browse files Browse the repository at this point in the history
fix: remove dev-word from account stack names
  • Loading branch information
aripalo authored Sep 1, 2022
2 parents 209d34e + 58bfc08 commit 96ab6f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/smartstack/name/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('SmartStack', () => {
accountType: 'mock',
stackId: 'my-stack',
},
expected: 'MyProject-Mock-Account-MyStack',
expected: 'MyProject-Account-MyStack',
},
{
name: 'environmentType empty',
Expand All @@ -61,7 +61,7 @@ describe('SmartStack', () => {
environmentType: '',
stackId: 'my-stack',
},
expected: 'MyProject-Mock-Account-MyStack',
expected: 'MyProject-Account-MyStack',
},
{
name: 'accountType missing',
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('SmartStack', () => {
environmentType: undefined,
stackId: 'my-stack',
},
expected: 'MyProject-'+capitalizeFirstLetter('n'.repeat(32))+'-Account-MyStack',
expected: 'MyProject-Account-MyStack',
},
{
name: 'too long environmentType name',
Expand Down
4 changes: 2 additions & 2 deletions src/smartstack/name/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const template = `{#
#}{{ environment | pascal | stripUnderscore | truncate(32, true, "") | prepend("Environment-") | append("-") }}{#
#}{% elif account | notEmpty %}{#
"Dev-Account-"
#}{{ account | pascal| truncate(32, true, "") | append("-Account-") }}{#
"Project-Account-"
#}Account-{#
#}{% endif %}{#
Expand Down

0 comments on commit 96ab6f2

Please sign in to comment.