quaint-judge-53508
04/15/2025, 12:22 AMpulumi-terraform-bridge
, and I have a question in the pattern of "how is this supposed to work" ...
Referring to this section of code: https://github.com/pulumi/pulumi-terraform-bridge/blob/master/pkg/convert/object.go#L74-L77
In the problematic code, attr
here has a value of api_token
, which is transformed to apiToken
before the map lookup; the map has a key api_token
but not a key apiToken
, and so no value is found, and the key:value pair of api_token:foo
is instead becoming apiToken:<nil>
.
Is the expectation that the key in enc.propertyEncoders
is apiToken
? if so, why bother doing name transformations?
Is the expectation that the key in p resource.PropertyValue
is apiToken
? If so, doesn't that mean the name transformation needs to happen twice, somewhere else?
Perhaps the code on line 77, pv, gotPV := pulumiMap[key]
should be pv, gotPV := pulumiMap[attr]
?quaint-judge-53508
04/15/2025, 12:30 AMp resource.PropertyValue
should be `apiToken`", because it looks like the expectation is that pulumi-side config variables use camel case, and the "issue" is that this provider is expecting snake case, and so this magic transformation is preventing the pair from propagating.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by