Skip to content

Commit

Permalink
Align constructNodeMetadata with constructNode naming schema
Browse files Browse the repository at this point in the history
There's a function in the Oracle provider which is named `nodeMetadata`. This conflicts
with function in cdktf base classes.

Hence, this PR aligins the naming with the change from `node` to `constructNode` (see #230)

Fixes #290
  • Loading branch information
skorfmann committed Aug 24, 2020
1 parent 8b17ea7 commit 620ba00
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/cdktf/lib/terraform-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class TerraformDataSource extends TerraformElement implements ITerraformR
this.rawOverrides
)

attributes['//'] = this.nodeMetadata
attributes['//'] = this.constructNodeMetadata

return {
data: {
Expand Down
2 changes: 1 addition & 1 deletion packages/cdktf/lib/terraform-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class TerraformElement extends Construct {
curr[lastKey] = value;
}

protected get nodeMetadata(): {[key: string]: any} {
protected get constructNodeMetadata(): {[key: string]: any} {
return {
metadata: {
path: this.constructNode.path,
Expand Down
2 changes: 1 addition & 1 deletion packages/cdktf/lib/terraform-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export abstract class TerraformModule extends TerraformElement {
this.rawOverrides
)

attributes['//'] = this.nodeMetadata
attributes['//'] = this.constructNodeMetadata

return {
module: {
Expand Down
2 changes: 1 addition & 1 deletion packages/cdktf/lib/terraform-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class TerraformResource extends TerraformElement implements ITerraformRes
this.rawOverrides
)

attributes['//'] = this.nodeMetadata
attributes['//'] = this.constructNodeMetadata

return {
resource: {
Expand Down
3 changes: 2 additions & 1 deletion test/test-providers/cdktf.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"vault",
"nomad",
"external",
"terraform-providers/openstack"
"terraform-providers/openstack",
"oci"
]
}

0 comments on commit 620ba00

Please sign in to comment.