diff --git a/CHANGELOG.md b/CHANGELOG.md index c39e24f09..cdbcba1ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - package-lock.json for all modules [#426](https://github.com/aws-solutions/serverless-image-handler/pull/426) - github workflows for running unit test, eslint and prettier formatting, cdk nag, security scans [#402](https://github.com/aws-solutions/serverless-image-handler/pull/402) - demo-ui unicode support [#416](https://github.com/aws-solutions/serverless-image-handler/issues/416) +- support for multiple cloudformation stack deployments in the same region ### Changed diff --git a/source/constructs/lib/common-resources/common-resources-construct.ts b/source/constructs/lib/common-resources/common-resources-construct.ts index 5878398e9..20b7e9f70 100644 --- a/source/constructs/lib/common-resources/common-resources-construct.ts +++ b/source/constructs/lib/common-resources/common-resources-construct.ts @@ -93,7 +93,7 @@ export class CommonResources extends Construct { const applicationType = "AWS-Solutions"; const application = new appreg.Application(stack, "AppRegistry", { - applicationName: Fn.join("-", [props.applicationName, Aws.REGION, Aws.ACCOUNT_ID]), + applicationName: Fn.join("-", ["AppRegistry", Aws.STACK_NAME, Aws.REGION, Aws.ACCOUNT_ID]), description: `Service Catalog application to track and manage all your resources for the solution ${props.applicationName}`, }); application.associateStack(stack); @@ -104,7 +104,7 @@ export class CommonResources extends Construct { Tags.of(application).add("Solutions:ApplicationType", applicationType); const attributeGroup = new appreg.AttributeGroup(stack, "DefaultApplicationAttributes", { - attributeGroupName: Aws.STACK_NAME, + attributeGroupName: `AppRegistry-${Aws.STACK_NAME}`, description: "Attribute group for solution information", attributes: { applicationType, diff --git a/source/constructs/test/__snapshots__/constructs.test.ts.snap b/source/constructs/test/__snapshots__/constructs.test.ts.snap index 02bbeaf95..1546e1cc4 100644 --- a/source/constructs/test/__snapshots__/constructs.test.ts.snap +++ b/source/constructs/test/__snapshots__/constructs.test.ts.snap @@ -333,7 +333,10 @@ exports[`Serverless Image Handler Stack Snapshot 1`] = ` "Fn::Join": [ "-", [ - "sih", + "AppRegistry", + { + "Ref": "AWS::StackName", + }, { "Ref": "AWS::Region", }, @@ -1823,7 +1826,15 @@ exports[`Serverless Image Handler Stack Snapshot 1`] = ` }, "Description": "Attribute group for solution information", "Name": { - "Ref": "AWS::StackName", + "Fn::Join": [ + "", + [ + "AppRegistry-", + { + "Ref": "AWS::StackName", + }, + ], + ], }, "Tags": { "SolutionId": "S0ABC",