We have to rename complex ImportProps fields #2206
Labels
closing-soon
This issue will automatically close in 4 days unless further comments are made.
package/awscl
Cross-cutting issues related to the AWS Construct Library
pr/needs-community-review
This PR needs a review from a Trusted Community Member or Core Team Member.
See the following code:
Looks correct, right? And TSC doesn't complain. It is, however, wrong. You're supposed to do this:
TSC accepts this because
vpcId
is a property on bothVpcNetworkImportProps
andIVpcNetwork
, and all the other fields are optional.I have spoken to at least 3 people who have made this mistake, and it seems to fit the pattern of the rest of the CDK. We have to fix this, either by making
Cluster.import()
take an actualIVpcNetwork
like everyone is expecting it to, or renaming the field something likevpcImportProps
.I don't know how much of this is going to be taken care of by #1546, but whatever is left after that should be fixed.
The text was updated successfully, but these errors were encountered: