Skip to content

Commit

Permalink
Add a test for count
Browse files Browse the repository at this point in the history
  • Loading branch information
Frassle committed Dec 7, 2022
1 parent c07dfe0 commit 878ed1d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/tf2pulumi/convert/testdata/count/main.tf
@@ -0,0 +1,13 @@
resource "simple_resource" "a_resource_with_count" {
count = 4
input_one = "Hello ${count.index}"
input_two = true
}

output "some_output_a" {
value = simple_resource.a_resource_with_count[0].result
}

output "some_output_b" {
value = simple_resource.a_resource_with_count[1].result
}
14 changes: 14 additions & 0 deletions pkg/tf2pulumi/convert/testdata/count/pcl/main.pp
@@ -0,0 +1,14 @@
resource aResourceWithCount "simple:index:resource" {
options {
range = 4

}
input_one = "Hello ${range.value}"
input_two = true
}
output someOutputA {
value = aResourceWithCount[0].result
}
output someOutputB {
value = aResourceWithCount[1].result
}

0 comments on commit 878ed1d

Please sign in to comment.