Skip to content

Commit

Permalink
refactor: update enum types to remove duplicate member values (#19320)
Browse files Browse the repository at this point in the history
CDK has some enums which use the same value for different enum members. This is done to support friendly names for EC2 instance and Subnet type. Having same value for differnt members causes the typescript compiler to ignore the members with same value and causes JSII not to generate the enum members in other languages. To fix this [JSII will throw an error](aws/jsii#3412) when enum members have the same value. Updating CDK code to ensure the build pass when this change lands in JSII

re #aws/jsii#3412

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*

(cherry picked from commit b0346a4)

# Conflicts:
#	packages/@aws-cdk/aws-ec2/lib/vpc.ts
#	packages/@aws-cdk/aws-ec2/lib/windows-versions.ts
  • Loading branch information
yuth authored and mergify[bot] committed Jun 30, 2022
1 parent f2b4eff commit d3606e9
Show file tree
Hide file tree
Showing 7 changed files with 368 additions and 99 deletions.
Loading

0 comments on commit d3606e9

Please sign in to comment.