You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/testing/equivalence-tests/tests/data_read/create/main.tf

33 lines
524 B

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
}