servicecatalogappregistry: lookupFromName for application
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
The ability to lookup a Service Catalog AppRegistry Application via it's Name or Id.
### Use Case
Once https://github.com/aws/aws-cdk/pull/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()` which returns a hydrated application that can then be used to `associateStack`.
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](https://github.com/aws/aws-cdk-cli/issues/787) which had the potential idea of using AppRegistry as an integrated primitive. This FR could potentially underpin that behavior for multi-stack applications.
### Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.30.0
### Environment details (OS name and version, etc.)
N/A
Contributor guide
Research direction
Start at the servicecatalogappregistry Application entry point and compare the requested Application.fromLookupName API with AWS Service Catalog AppRegistry's GetApplication operation. Verify that the lookup returns a hydrated application usable by associateStack, and resolve whether context should be account/environment-specific or support an opt-in shared key before considering the feature complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100