learn icon indicating copy to clipboard operation
learn copied to clipboard

Application name parsing error

Open ehelbig1 opened this issue 5 years ago • 0 comments

I ran into an error, snsdev-dev already exists, when trying to create a new project. After a bit of digging it appears that root of the problem is the generation of resource names:

RoleName: !If [ShouldNotCreateEnvResources, 'boardg891ab340_sns-role', !Join ['',[ 'sns', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]

This pattern is present in many location throughout the CloudFormation templates and dictates that there must be a convention followed when naming applications. This convention is not enforced through the CLI when initially creating the project.

A name like example-app breaks this convention and can cause issues.

Can the resource name generation algorithm be changed to support additional conventions?

If not, can restrictions on project names be added to the CLI?

ehelbig1 avatar Apr 21 '20 14:04 ehelbig1