File tree 2 files changed +9
-2
lines changed
packages/@aws-cdk/aws-servicecatalogappregistry
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,10 @@ const app = new App();
75
75
const associatedApp = new appreg .ApplicationAssociator (app , ' AssociatedApplication' , {
76
76
applications: [appreg .TargetApplication .createApplicationStack ({
77
77
applicationName: ' MyAssociatedApplication' ,
78
+ // 'Application containing stacks deployed via CDK.' is the default
79
+ applicationDescription: ' Associated Application description' ,
78
80
stackName: ' MyAssociatedApplicationStack' ,
81
+ // AWS Account and Region that are implied by the current CLI configuration is the default
79
82
env: { account: ' 123456789012' , region: ' us-east-1' },
80
83
})],
81
84
});
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export interface CreateTargetApplicationOptions extends TargetApplicationCommonO
27
27
/**
28
28
* Application description.
29
29
*
30
- * @default - No description .
30
+ * @default - Application containing stacks deployed via CDK .
31
31
*/
32
32
readonly applicationDescription ?: string ;
33
33
}
@@ -90,10 +90,14 @@ class CreateTargetApplication extends TargetApplication {
90
90
}
91
91
public bind ( scope : Construct ) : BindTargetApplicationResult {
92
92
const stackId = this . applicationOptions . stackId ?? 'ApplicationAssociatorStack' ;
93
+ ( this . applicationOptions . description as string ) =
94
+ this . applicationOptions . description || `Stack that holds the ${ this . applicationOptions . applicationName } application` ;
95
+ ( this . applicationOptions . env as cdk . Environment ) =
96
+ this . applicationOptions . env || { account : process . env . CDK_DEFAULT_ACCOUNT , region : process . env . CDK_DEFAULT_REGION } ;
93
97
const applicationStack = new cdk . Stack ( scope , stackId , this . applicationOptions ) ;
94
98
const appRegApplication = new Application ( applicationStack , 'DefaultCdkApplication' , {
95
99
applicationName : this . applicationOptions . applicationName ,
96
- description : this . applicationOptions . applicationDescription ,
100
+ description : this . applicationOptions . applicationDescription || 'Application containing stacks deployed via CDK.' ,
97
101
} ) ;
98
102
99
103
return {
You can’t perform that action at this time.
0 commit comments