-
Notifications
You must be signed in to change notification settings - Fork 457
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
Avoid conflicts with resource attributes called "node" #230
Conversation
this.stack = TerraformStack.of(this); | ||
} | ||
|
||
public get node(): Node { | ||
public get constructNode(): Node { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm... Interesting... I am wondering if we should take this into account in constructs 10.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential naming conflicts should be a thought of, yes.
@skorfmann We discussed this in our team and unfortunately we will have to reintroduce So we are "stuck" with I would recommend changing your the terraform code generator to simply mangle the name |
To reduce the chance for conflicts with generated domain-specific properties in subclasses of `Construct` (see [terraform-cdk issue]), we decided that we will rename `node` to `construct`, which is less prevalent. We plan to remove the `node` API in the next major version of the AWS CDK, and therefore recommend users to migrate their code to use `construct` instead. Part of aws/aws-cdk-rfcs#192 [terraform-cdk issue]: hashicorp/terraform-cdk#230
…ct" (#9557) To reduce the chance for conflicts with generated domain-specific properties in subclasses of `Construct` (see [terraform-cdk issue]), we decided that we will rename `node` to `construct`, which is less prevalent. We plan to remove the `node` API in the next major version of the AWS CDK, and therefore recommend users to migrate their code to use `construct` instead. See discussion in the [RFC]. [terraform-cdk issue]: hashicorp/terraform-cdk#230 [RFC]: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#10-construct-node ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
The
consul
provider has an attribute callednode
, which conflicts with the function inTerraformElement
.This introduces a more specific name
constructNode
to avoid conflicts like this.Fixes #125