[apigateway] Allow customizing the name of the CfnOutput containing the API endpoint
See original GitHub issueNote: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.
-
I’m submitting a …
- 🪲 bug report
- 🚀 feature request
- 📚 construct library gap
- ☎️ security issue or vulnerability => Please see policy
- ❓ support request => Please see note at the top of this template.
-
What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce Currently rest api creation automatically creates an Output value. But it does not create an export for this output. Also, there does not seem to be any way to export this output by overriding the output property to add an export in any way. If I add something like -
core.CfnOutput(self, id="Test", value=topic.topic_arn, export_name="Test")
This will add a duplicate output
-
What is the expected behavior (or behavior of feature suggested)? I expect that if there is an output for this, then it should also support in some way to add an export for it.
-
What is the motivation / use case for changing the behavior or adding this feature? If we are still doing an auto-output for rest api, then why not even add auto-exporting?
-
Please tell us about your environment:
- CDK CLI Version: 1.3.0
- Module Version: xx.xx.xx
- OS: [all | Windows 10 | OSX Mojave | Ubuntu | etc… ]
- Language: Python
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
https://github.com/aws/aws-cdk/issues/1611 disabled exports by default. But output is still added by default for REST API. How/Why can’t I add an export to it too?
And by the sense of it, why is output still added by default too? What if I had a resource count of 61 and all of them are rest api, wouldn’t it exceed the limit?
Also, any example to address cross stack reference by using export import using python would really help since this is something that i was not able to find in the documentation.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top GitHub Comments
Yup - I think the
RestApi
construct should just not provision aCfnOutput
at all. Let the user decide whether they want an output or not (it’s trivial for them to create one if they need it), and decide whether it’s exported or not.@eladb can you help me understand this better. Not sure what you mean by “even if you specify an exportName, you will only be able to control the relative construct ID o the Output and not the full ID”, because
CfnOutput
does exceptexportName
in props, so when I pass exportName as a prop like:new CfnOutput(this, 'Endpoint', { exportName: ''my-export-name", value: some-value });
it should create output withmy-export-name
right?