https://pulumi.com logo
#getting-started
Title
# getting-started
b

better-dentist-3207

08/02/2023, 5:39 PM
I'm migrating a pretty big project from AWS CDK to Pulumi. (CloudFormation woes, cloudflare + hetzner in the mix etc.) No going back at this point. Unfortunately I just realized how much I miss the interfaces and the overall type design in AWS CDK. Trivial Example: • pulumi's aws.ssm.Parameter has a
keyId: string
prop that takes the string of ARN of KMS key • cdk's aws.ssm.StringParameter has
encryptionKey: IKey
prop that directly takes an KMS key object ◦ same IKey can be derived from something and applied directly to the StringParameter ◦ no stringly-typed foot-guns ◦ (and also has methods for
.grant()
that allows easy minimum permissions) AWS CDK has this stuff all over the place that enforces a proper type system between resources. Is there a way to improve Pulumi's stringly-types in my codebase?
q

quaint-hydrogen-7228

08/03/2023, 9:00 AM
Pulumi resources for AWS are more like L1 constructs in AWS CDK, so it is more of building your own abstractions and interfaces. Crosswalk for AWS builds some higher-level components, but references between resources are not hidden behind interfaces. Technically, you could use the Pulumi CDK adapter (https://github.com/pulumi/pulumi-cdk) to use AWS CDK constructs in your Pulumi solution. That one uses the aws-native provider under the hood as I recall, so there may not be full coverage there.