-
Notifications
You must be signed in to change notification settings - Fork 4.5k
RestApi Endpoint Output Name & Export #1611
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-apigatewayRelated to Amazon API GatewayRelated to Amazon API GatewaybugThis issue is a bug.This issue is a bug.
Description
The Endpoint child created by RestApi doesn't seem usable because it has random characters appended to it (e.g. apiEndpoint9349E63C) and the exported name collides across multiple stack instances (I'm synthesizing the stack once in a build step and deploying multiple instances of it from CodePipeline).
Can we remove the Endpoint child construct so 1) I don't have to use findChild to disable exporting the output (see below) and 2) I don't have unnecessary stack outputs?
const restApi = new api.RestApi(this, 'api', {
restApiName: (new cdk.AwsStackName()) as any
});
// Don't export the stack output because it collides when multiple
// CloudFormation stacks are created in one account.
restApi.findChild('Endpoint')['export'] = undefined;
new cdk.Output(this, 'Endpoint', {
value: restApi.urlForPath(),
disableExport: true
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-apigatewayRelated to Amazon API GatewayRelated to Amazon API GatewaybugThis issue is a bug.This issue is a bug.