Skip to content

Commit

Permalink
Add a test for name conflicts (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frassle committed Dec 12, 2022
1 parent fbb76a5 commit 462deea
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/tf2pulumi/convert/testdata/name_conflict/main.tf
@@ -0,0 +1,21 @@
variable "a_thing" {

}

locals {
a_thing = true
}

resource "simple_resource" "a_thing" {
input_one = "Hello ${var.a_thing}"
input_two = local.a_thing
}

data "simple_data_source" "a_thing" {
input_one = "Hello ${simple_resource.a_thing.result}"
input_two = local.a_thing
}

output "a_thing" {
value = data.simple_data_source.a_thing.result
}
14 changes: 14 additions & 0 deletions pkg/tf2pulumi/convert/testdata/name_conflict/pcl/main.pp
@@ -0,0 +1,14 @@
config aThingInput {
}
myAThing = true
resource aThingresource "simple:index:resource" {
inputOne = "Hello ${aThingInput}"
inputTwo = myAThing
}
aThingdata_source = invoke("simple:index:data_source", {
inputOne = "Hello ${aThingresource.result}",
inputTwo = myAThing
})
output aThing {
value = aThingdata_source.result
}

0 comments on commit 462deea

Please sign in to comment.