Adding VPC Gateway Endpoint to VPC created fromLookup fails
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
Adding a VPC gateway type endpoint to a VPC referenced by Vpc.fromLookup fails with AttributeError: '_IVpcProxy' object has no attribute 'add_gateway_endpoint'
Python code;
vpc = ec2.Vpc.from_lookup(self, "VPC", is_default=True)
s3_endpoint = vpc.add_gateway_endpoint('S3Endpoint',
service=ec2.GatewayVpcEndpointAwsService('s3'))
Similar error message using vpc. add_s3_endpoint()
.
though ,
storage_gateway_endpoint = vpc.add_interface_endpoint('StorageGatewayEndpoint',
service=ec2.InterfaceVpcEndpointAwsService('storagegateway'))
is successful.
-
What is the expected behavior (or behavior of feature suggested)?
-
What is the motivation / use case for changing the behavior or adding this feature?
-
Please tell us about your environment:
- CDK CLI Version: 1.2.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)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
For what is worth, in my case it helped when I deleted cdk.context.json.
Still having a problem when trying to add a gateway endpoint to a VPC that was imported using “vpc.fromLookup”. Error message: ‘Can’t add a gateway endpoint to VPC; route table IDs are not available’.
CDK 1.84, MacOS BigSur, Node 12.18.3.