terraform-cdk icon indicating copy to clipboard operation
terraform-cdk copied to clipboard

Represent all maps with generated classes

Open DanielMSchmidt opened this issue 3 years ago • 1 comments
trafficstars

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

Description

Currently we only wrap computed maps through classes, to make maps accessible in all languages as references / accessors we should support them in all use-cases, so also non-computed (writable) maps should be wrapped. This is probably a similar effort as supporting all lists

References

DanielMSchmidt avatar Jun 14 '22 17:06 DanielMSchmidt

@DanielMSchmidt do you have an example of a case that you'd like to change? I can see a case in code, but my previous provider snapshot didn't actually have any instances where that case hits.

jsteinich avatar Jun 16 '22 02:06 jsteinich

For the values map returned by the tfe_outputs datasource (docs) it would be nice if the new map type would have utility functions to retrieve typed values (e.g. .getString(), getList(), etc.) so that a user does not need to wrap them in Token.asList() or similar.

ansgarm avatar Sep 27 '22 19:09 ansgarm