New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TagsAddingAspect example produces Self-referential block #1892
Comments
|
Makes sense. Thx. |
I tested it and see another problem.
In this case node.tagsInput is empty but node.tags contains just the dict. |
I think since we are not dealing with tokens anymore you should be able to do |
This overwrites the existing tags added elsewhere. Like { test: "ing"} above. |
I have tried with both approaches but still getting error. |
Hi @galaabattur, have you seen the commit from @DanielMSchmidt (back-linked above)? // We need to take the input value to not create a circular reference
const currentTags = node.tagsInput || {};
node.tags = { ...this.tagsToAdd, ...currentTags }; Does that solve it for you as well? |
Hi @ansgarm thank you for the response. I have tried it and have following question. In this case, where would |
Hi @galaabattur, Going to re-open this to fix that the Aspects example does not fail with a type error due to |
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. |
Community Note
cdktf & Language Versions
cdktf: 0.11.2
terraform: 1.2.3
typescript
Affected Resource(s)
aws_ssm_parameter but any resource with non empty tags.
Debug Output
The Gist contains the generated terraform json and the error.
Gist
Expected Behavior
Tags should have been read from the resource, merged and readied to the resource.
Actual Behavior
Terraform considers this a self-referential block and aborts.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: