servicecatalogappregistry: Allow users to set ApplicationAssociator stack ID #24160
Labels
@aws-cdk/aws-servicecatalogappregistry
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
Allow users to set ApplicationAssociator stack ID to maintain project naming convention for stack IDs in AWS CDK Toolkit output.
Use Case
I maintain a certain convention in my projects for the stack ID. For example: (e.g.
UserManagementBackendSandbox
). I wanted the stack ID thatApplicationAssociator
class defines to align with that convention (e.g.UserManagementBackendApplication
). This way, I control and understand the origin of stack IDs listed in AWS CDK Toolkit output (e.g.cdk synth
).With current behavior, the
cdk synth
output I get is:The
ApplicationAssociatorStack
name was surprising for me, as I didn't specify it. I had to look atApplicationAssociator
source code to understand where it's coming from. It also wasn't obvious from the documentation thatApplicationAssociator
creates a dedicated stack for the application. I added this clarification.Proposed Solution
Match stack ID to stack name or allow to specify it directly as it possible today with stack ID property:
aws-cdk/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts
Line 94 in 6a9e43f
If the plan is to still deprecate the stack ID property, I think the stack ID value should match the stack name exactly to allow users control over the generated stack ID. In regular stacks, users provide the construct ID for the stack, which becomes the stack ID. Any default value without allowing users to influence stack ID would remove that flexibility.
Other Information
Related pull request: #22508
Related issue: #23861
Acknowledgements
CDK version used
2.64.0
Environment details (OS name and version, etc.)
macOS Monterey
The text was updated successfully, but these errors were encountered: