(core): No ability to explicitly set OutputKey for CfnOutput #21432
Labels
@aws-cdk/core
Related to core CDK functionality
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
I would expect [https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk/CfnOutput.html](CfnOutput] to provide a
key
oroutput_key
parameter, that would allow me to override the automatically generated OutputKey with one I explicitly provide.This would parallel many other constructs, such as aws_lambda.LambdaFunction which provides a
function_name
parameter to allow you to override the automatically generated FunctionName.Use Case
In order to programmatically work with stack outputs, I need a well known identifier for each output.
At the moment I'm being forced to provide an ExportName name for the output, even though I don't use the output in any other stack. This means I have to worry about the account wide (or is it region wide?) namespace of export names, rather than the stack wide namespace of stack output names.
Proposed Solution
No response
Other Information
This issue is touched upon by #1773
Acknowledgements
CDK version used
2.35.0, Python
Environment details (OS name and version, etc.)
Ubuntu 20.04 on WSL 2 within Windows 10.0.19044
The text was updated successfully, but these errors were encountered: