terraform/testing/equivalence-tests/tests/data_read/create/main.tf
Liam Cervante 82b5cfad7e
Add more equivalence tests that are testing edge cases around the new structured renderer (#32538)
* add test cases

* run equivalence tests

* delete old outputs

* drift_relevant_attributes should ignore the number attribute

* also add a test for data reads

* test destroy only
2023-01-20 09:31:11 +01:00

32 lines
524 B
HCL

variable "contents" {
type = string
}
resource "random_integer" "random" {
min = 1000000
max = 9999999
seed = "F78CB410-BA01-44E1-82E1-37D61F7CB158"
}
locals {
contents = jsonencode({
values = {
id = {
string = random_integer.random.id
}
string = {
string = var.contents
}
}
})
}
resource "local_file" "data_file" {
filename = "terraform.data/${random_integer.random.id}.json"
content = local.contents
}
output "id" {
value = random_integer.random.id
}