servicecatalogappregistry: lookupFromName for application #20958
Labels
@aws-cdk/aws-servicecatalogappregistry
@aws-cdk/cx-api
Related to the Cloud Executable API
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p3
Describe the feature
The ability to lookup a Service Catalog AppRegistry Application via it's Name or Id.
Use Case
Once #20850 lands, it'll be possible to create a central "application" and then share it. This will enable creating multi-env deployments and associating them back to a single application. A possible solution to make this work is to bootstrap the SCAR App and then store the Arn in context, but to make it more "automatic" it'd be nice to define a name and then look it up.
Proposed Solution
AWS SC AppRegistry exposes an API to get applications by name: https://docs.aws.amazon.com/servicecatalog/latest/dg/API_app-registry_GetApplication.html.
Expose this as
Application.fromLookupName(<name>)
which returns a hydrated application that can then be used toassociateStack
.For efficiencies sake, it might make sense to have an opt in behavior (either via prop or flag) to have the context key not be account/env specific for the likely to be more common case that there's a single application which is then shared across org (and therefore is technically unique).
Other Information
An alternative would be a way to write out the resulting ARN from creation directly to context, but I'm not sure that's possible and/or desired? If that's possible though, it could obviate the need for this.
Related, there was a neat idea proposed here which had the potential idea of using AppRegistry as an integrated primitive. This FR could potentially underpin that behavior for multi-stack applications.
Acknowledgements
CDK version used
2.30.0
Environment details (OS name and version, etc.)
N/A
The text was updated successfully, but these errors were encountered: