Skip to content

Commit b7b386c

Browse files
fix(installer): Adding validation to Accelerator Name and Prefix (#631)
* Adding validation to Accelerator Name and Prefix * Forcing - in the end for Accelerator prefix * Removing _ from name and prefix. Also remove - from name
1 parent 42e9cda commit b7b386c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/installer/cdk/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ async function main() {
2828
const acceleratorPrefixParam = new cdk.CfnParameter(stack, 'AcceleratorPrefix', {
2929
default: 'PBMMAccel-',
3030
description: 'Accelerator prefix used for deployment.',
31+
allowedPattern: '[a-zA-Z][a-zA-Z0-9-]*-',
3132
});
3233

3334
const acceleratorNameParam = new cdk.CfnParameter(stack, 'AcceleratorName', {
3435
default: 'PBMM',
3536
description: 'Accelerator Name used for deployment.',
37+
allowedPattern: '[a-zA-Z][a-zA-Z0-9]*',
3638
});
3739

3840
const acceleratorName = acceleratorNameParam.valueAsString;

0 commit comments

Comments
 (0)