back
terraform {
required_providers {
template = ">= 2.2.0"
}
}
top
module "template_file" {
source = "./modules/template/r/template_file"
# filename - (optional) is a type of string
filename = null
# template - (optional) is a type of string
template = null
# vars - (optional) is a type of map of string
vars = {}
}
top
variable "filename" {
description = "(optional)"
type = string
default = null
}
variable "template" {
description = "(optional) - Contents of the template"
type = string
default = null
}
variable "vars" {
description = "(optional) - variables to substitute"
type = map(string)
default = null
}
top
resource "template_file" "this" {
# filename - (optional) is a type of string
filename = var.filename
# template - (optional) is a type of string
template = var.template
# vars - (optional) is a type of map of string
vars = var.vars
}
top
output "id" {
description = "returns a string"
value = template_file.this.id
}
output "rendered" {
description = "returns a string"
value = template_file.this.rendered
}
output "this" {
value = template_file.this
}
top