Using version "0.8.0", creating VPC stack does not work:
VpcNetwork vpc = new VpcNetwork(this,
"MyCdkVpc",
VpcNetworkProps.builder()
.withCidr("10.0.0.0/16")
.withMaxAZs(3)
.withSubnetConfiguration(Arrays.asList(
SubnetConfiguration.builder()
.withSubnetType(SubnetType.Private)
.withName("my-private-subnet-1")
.withCidrMask(24)
.build()))
.withNatGateways(1)
.build());
Results in following error:
Malformed enum value: @aws-cdk/aws-ec2.SubnetType/Private
Error: Malformed enum value: @aws-cdk/aws-ec2.SubnetType/Private
when executing cdk deploy.
Same applies to other enums like DefaultInstanceTenancy.
Thanks for the report! At the moment we're a bit busy getting our release cycle finished, but we'll pick this up as soon as possible.
Thanks! TypeScript support on the other hand works like a charm. Really awesome tool!
@rix0rrr -- if this is something I broke and you can point me in the right place let me know.
I'm honestly not sure, but it doesn't seem like something you should have been able to break. So don't worry about it.
Thanks for offering though!
Similar issue with the java getting started example: Exception in thread "main" software.amazon.jsii.JsiiException: Malformed enum value: @aws-cdk/aws-s3.BucketEncryption/KmsManaged
(the example mentions passing "MANAGED" as string and I assume it was changed to an enum recently, which is a great, but it fails similarly if I try any value that is accepted in the .withEncryption(...) builder method)
Thanks for reporting. We understand why this happens and will hopefully include a fix in our next release, probably early next week.
Apologies for the unpleasant experience!
No worries, I actually started to love TypeScript version!
Most helpful comment
Apologies for the unpleasant experience!