aws-ec2: Export NatGatewayProvider #28372
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
(originally posted as a discussion)
There are two implementations of NatProvider: NatGatewayProvider and NatInstanceProvider.
Of the two, only NatInstanceProvider is exported. Both are usable through
aws_ec2.NatProvider.instance()
andaws_ec2.NatProvider.gateway()
respectively, but since only NatInstanceProvider is exported the docs indicate thatNatProvider
is only implemented byNatInstanceProvider
.I suggest that NatGatewayProvider also be exported, so that both providers are available through both interfaces and so the docs correctly reflect the two available implementations of
NatProvider
.Use Case
No real new functionality is exposed, except the ability to instantiate NatGatewayProvider directly instead of using the static method of NatProvider. The main advantage is the implied update to the docs.
Proposed Solution
I think this is as simple as inserting an
export
at the start of L217aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/nat.ts
Lines 214 to 261 in c6471f2
Other Information
No response
Acknowledgements
CDK version used
2.115.0
Environment details (OS name and version, etc.)
Windows 10
The text was updated successfully, but these errors were encountered: