Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java - "Malformed enum value" #467

Closed
maciejwalkowiak opened this issue Aug 1, 2018 · 8 comments · Fixed by #523
Closed

Java - "Malformed enum value" #467

maciejwalkowiak opened this issue Aug 1, 2018 · 8 comments · Fixed by #523
Assignees
Labels
bug This issue is a bug.

Comments

@maciejwalkowiak
Copy link
Contributor

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.

@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 1, 2018

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.

@rix0rrr rix0rrr added the bug This issue is a bug. label Aug 1, 2018
@maciejwalkowiak
Copy link
Contributor Author

Thanks! TypeScript support on the other hand works like a charm. Really awesome tool!

@moofish32
Copy link
Contributor

@rix0rrr -- if this is something I broke and you can point me in the right place let me know.

@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 2, 2018

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!

@eranation
Copy link

eranation commented Aug 3, 2018

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)

@eladb
Copy link
Contributor

eladb commented Aug 3, 2018

Thanks for reporting. We understand why this happens and will hopefully include a fix in our next release, probably early next week.

@eladb
Copy link
Contributor

eladb commented Aug 3, 2018

Apologies for the unpleasant experience!

@eladb eladb self-assigned this Aug 5, 2018
@maciejwalkowiak
Copy link
Contributor Author

No worries, I actually started to love TypeScript version!

@eladb eladb mentioned this issue Aug 8, 2018
RomainMuller pushed a commit that referenced this issue Aug 8, 2018
* Bump
* Added a `bump.sh` script ;-)

Fixes #467 (via aws/jsii#139)
Fixes #503 (via #517)
Fixes #502 (via #490)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants