You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When overriding getLogicalId (get_logical_id py func) to simply return the node id (as per 3433's solution), I would expect for cross-stack output's to also have correctly formatted resource IDs just like the rest of the resources.
Whilst not the best solution, adding a simple if condition to return the usual allocateLogicalId where the node id contains "cross-stack-output" (this doesn't seem to effect the "cross-stack-reference" id).
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
The text was updated successfully, but these errors were encountered:
It seems like there are dots introduced into the name by cross stack references (which is not valid Terraform). Normally they'd be replaced by the built-in logical id logic I suppose – so that would be something that would need to be replaced in your get_logical_id implementation.
I did not test cross stack references when I looked into how to solve the outputs id request, so it seems that they require some more adjustment there.
Expected Behavior
When overriding getLogicalId (get_logical_id py func) to simply return the node id (as per 3433's solution), I would expect for cross-stack output's to also have correctly formatted resource IDs just like the rest of the resources.
Override function is below:
Actual Behavior
The outputted cdk.tf.json correctly has a passable resource name, however, the following error is produced.
cdk.tf.json:

terminal output:

Steps to Reproduce
Versions
language: python
cdktf-cli: 0.19.2
node: v21.5.0
cdktf: 0.20.3
constructs: 10.3.0
jsii: 1.94.0
terraform: 1.6.5
arch: arm64
os: darwin 23.2.0
python: Python 3.11.7
pip: pip 24.0 from /Users/mikeyscott/Documents/traffyk-ai-data-platform/.venv/lib/python3.11/site-packages/pip (python 3.11)
pipenv: null
Providers
cdktf-cdktf-provider-archive (PREBUILT)
terraform provider version: 2.4.2
prebuilt provider version: 10.0.1
cdktf version: ^0.20.0
cdktf-cdktf-provider-aws (PREBUILT)
terraform provider version: 5.37.0
prebuilt provider version: 19.6.0
cdktf version: ^0.20.0
cdktf-cdktf-provider-tls (PREBUILT)
terraform provider version: 4.0.5
prebuilt provider version: 10.0.0
cdktf version: ^0.20.0
Gist
No response
Possible Solutions
No response
Workarounds
Whilst not the best solution, adding a simple if condition to return the usual allocateLogicalId where the node id contains "cross-stack-output" (this doesn't seem to effect the "cross-stack-reference" id).
Anything Else?
I am using node 21 which throws the "untested node version warning". I don't suspect this would cause this issue.
This is also my first issue here so please let me know if I haven't don't anything correctly.
References
#3433
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: