mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-21 18:10:30 -04:00
* 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
32 lines
524 B
HCL
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
|
|
}
|