Open blairham opened 1 year ago
This sort of thing was briefly mentioned in https://github.com/hashicorp/terraform-cdk/pull/2446#pullrequestreview-1227833208.
Should probably just remove the keysToSnakeCase
function and explicitly set in the few places where it is still needed.
Also running into this problem with my custom provider, which is using schema.MapAttribute
and it will transform my keys from kebab-case to snake_case, which will break things.
For now I can workaround with this:
const ipamProvider = new provider.IpamProvider(
this,
"ipamProvider"
// {
// // will result in wrong keys:
// staticAssignments: data.staticAssignments,
// }
);
// Hotfix https://github.com/hashicorp/terraform-cdk/pull/395#issuecomment-822786292
ipamProvider.addOverride("static_assignments", data.staticAssignments);
cdktf & Language Versions
Affected Resource(s)
Expected Behavior
When creating a
map
TerraformVariable, it should not modify the keys as the module expects specific case-sensitive values.In
cdktf.json
,Actual Behavior
When creating a
map
TerraformVariable, I the keys are changed to snake case.Steps to Reproduce