add template for directives

This commit is contained in:
mhoffm
2021-09-17 20:53:40 +02:00
committed by Michael Hoffmann
parent 67a5c19755
commit c0513ba689
1582 changed files with 28118 additions and 16805 deletions

View File

@@ -0,0 +1,39 @@
variable "number" {
default = 3
}
variable "string" {
default = "Hello, World"
}
variable "map" {
type = map(string)
default = {
"foo" = "bar",
"baz" = "bat",
}
}
locals {
result = length(var.list)
}
variable "list" {
type = list(string)
default = ["red", "orange", "yellow", "green", "blue", "purple"]
}
resource "test_resource" "example" {
for_each = var.map
name = each.key
tag = each.value
}
module "child" {
source = "./child"
list = var.list
}
output "result" {
value = module.child.result
}