pulumi / pulumi-cdk

Pulumi/CDK Interop Library
Apache License 2.0
60 stars 5 forks source link

fix: update deps and correctly map resource/property names #129

Closed corymhall closed 3 weeks ago

corymhall commented 1 month ago

This PR does a couple of different things. I was originally going to try and split it into multiple PRs, but there were too many dependencies between the changes

  1. switches the test runner from mocha to jest to align with our other node based projects (like awsx).
  2. Added some tests for cfn-resource-mappings and aws-resource-mappings
  3. Update dependencies to newest versions
    • Also moved @pulumi/* and aws-cdk dependencies from dependencies to peerDependencies which allows users to determine which versions they want to install. 3a. As part of the dependency updates had to fix some of the mappings
    • Update iam.Role mapping to correctly map the Policies property.
    • Update s3objectlambda.AccessPoint to correctly map contentTransformation properties.
    • Update autoscaling.Group properties correctly
    • Update ec2.Route properties (remove instanceId prop)
  4. Implement a TypeScript version of the naming package from aws-native so that we will more reliably map resource/property names between CFN and pulumi.

Note on peerDependencies peerDependencies allow us to specify a minimum required version that works with our library and then the user can decide which version to install. I think as we (or the community) develops more component libraries it might be more important to use peerDependencies. When there are multiple libraries that all depend on some core library and they all specify the core library as a dependency then there will be multiple versions of that core library installed. Sometimes this can cause incompatibility between libraries. The article below goes into some more detail.

dev.to/aws-builders/correctly-defining-dependencies-in-l3-cdk-constructs-45p

corymhall commented 3 weeks ago

/release minor