Closed pgavlin closed 4 months ago
Added to epic https://github.com/pulumi/pulumi-service/issues/20861
I addressed this for a different tool using the was-native
provider's resource metadata document: https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-resource-aws-native/metadata.json
This document is a mapping from Pulumi type token to resource metadata. This metadata includes a cf
field that contains the CF/CCAPI type. We can use this to generate a table that maps Pulumi type tokens to CF/CCAPI types.
Unfortunately this isn't available from the provider at runtime. Its mappings should be relatively static, though, so it is likely safe to pull it from the source repo at a particular version and then update it on a regular cadence.
Determining the AWS CCAPI resource type from the C# namespace mapping is not reliable. This approach misses several resource categories, most notably
EC2
(which the C# mappings case asEc2
). We need to fix this so we don't rely on those mappings and instead use a more reliable mechanism.