Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stack name in Service Catalog Application name for multiple cfn stack deployments #438

Merged
merged 4 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down
15 changes: 13 additions & 2 deletions source/constructs/test/__snapshots__/constructs.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,10 @@ exports[`Serverless Image Handler Stack Snapshot 1`] = `
"Fn::Join": [
"-",
[
"sih",
"AppRegistry",
{
"Ref": "AWS::StackName",
},
{
"Ref": "AWS::Region",
},
Expand Down Expand Up @@ -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",
Expand Down