Skip to content

TerraformVariable of number type doesn't get replaced #2420

Open
@shishkin

Description

@shishkin

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

cdktf & Language Versions

cdktf 0.14.1 with TypeScript

UPDATE: Same behavior in 0.14.3.

Affected Provider / Resource(s)

@cdktf/provider-kubernetes

Tried on ConfigMapV1 and SecretV1

Debug Output

https://gist.github.com/shishkin/1c6b19a7e1c6fb92f2734a694c7b3013#file-output

Expected Behavior

Expected the clusterPortHttps variable replaced with its value in the resulting config map resource.

Actual Behavior

var.CLUSTER_PORT_HTTPS is output inside resulting config map resource.

Steps to Reproduce

https://gist.github.com/shishkin/1c6b19a7e1c6fb92f2734a694c7b3013#file-stack-ts

Important Factoids

Numeric variable value is output correctly when put inside TerraformOutput construct. String variable clusterDomain is output correctly inside both config map resource and TerraformOutput.

UPDATE: Also the port number is output in the config map resource correctly when its value is referred to via .stringValue or .value instead of typed .numberValue.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug/has-workaroundA bug with a workaround (may not be elegant)cdktffeature/tokenshelp wantedCommunity contributions welcome as the core team is unlikely to work on this soonpriority/backlogLow priority (though possibly still important). Unlikely to be worked on within the next 6 months.size/smallestimated < 1 dayux/configuration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions