Closed mutahhir closed 11 months ago
JSII Issue: https://github.com/aws/jsii/issues/3967
Going to mark this as a non-blocker since the release of #2744 as that PR moves away from using string templates and on to string concatenation instead.
Wellllll, there's a now string concatenation problem in Python 😂
File "/Users/ansgar/projects/playground/test-cdktf-convert/main.py", line 30, in __init__
"description": "changeme-aws-security-group-dynamic-ingress-${" + aws_security_group_changeme_aws_security_group_dynamic_dynamic_iterator0.key + "}",
TypeError: can only concatenate str (not "_LazyBaseProxy") to str
(more context in the original comment: https://github.com/hashicorp/terraform-cdk/issues/2637#issuecomment-1505210351)
edit: the code above works in TypeScript because the Lazy class has an toString
method. This would work in other languages too, if JSII would implement this feature request: https://github.com/aws/jsii/issues/380
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Python
Converted
Reference a property via fqn better
Should not be using terraform escape here?
Just generally using the hcl literal escapes wrong
More complex example
Error
Correct way
CSharp
When it should be:
It shouldn't even need to escape the dollar sign, so even
$"${{length...
should work too?