Skip to content

Synth changing TerraformVariable map keys to snake case #2473

Open
@blairham

Description

@blairham

cdktf & Language Versions

language: typescript
cdktf-cli: 0.14.3
node: v16.15.1
cdktf: 0.14.3
constructs: 10.1.215
terraform: 1.1.7

Affected Resource(s)

  • CDKTF Typescript
    const tags = new TerraformVariable(this, "default_tags", {
      type: "map",
      default: {
        BusinessOwner: "Magoo",
        Environment: "sbx",
        Deployment: "Terraform",
      },
    });

Expected Behavior

When creating a map TerraformVariable, it should not modify the keys as the module expects specific case-sensitive values.

In cdktf.json ,

  "variable": {
    "default_tags": {
      "default": {
        "BusinessOwner": "Magoo",
        "Deployment": "Terraform",
        "Environment": "sbx",
      },
      "type": "map"
    }

Actual Behavior

When creating a map TerraformVariable, I the keys are changed to snake case.

  "variable": {
    "default_tags": {
      "default": {
        "business_owner": "Magoo",
        "deployment": "Terraform",
        "environment": "sbx",
      },
      "type": "map"
    }

Steps to Reproduce

  • run Synth
  • look at cdktf.json output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions