dir

apparentlymart/dir/template

Terraform Module HCL TEMPLATE

A template module for preparing static files and templates under a particular directory

Install
module "dir" {
source = "apparentlymart/dir/template"
version = "1.0.2"
}
⭐ Source on GitHub 📦 Registry page
README

Terraform Template Directory Module This is a compute-only Terraform module (that is, a module that doesn't make any remote API calls) which gathers all of the files under a particular base directory and renders those which have a particular suffix as Terraform template files. ``hcl module "template_files" { source = "hashicorp/dir/template" base_dir = "${path.module}/src" template_vars = { # Pass in any values that you wish to use in your templates. vpc_id = "vpc-abc123" } } ` The files output is a map from file paths relative to the base directory to objects with the following attributes: content_type: A MIME type to use for the file. content: Literal content of the file, after rendering a template. source_path: Local filesystem location of a non-template file. digests: A map containing

Inputs (5)
NameTypeDescriptionDefault
base_dirstringThe base directory in which this module will search for static files and templat required
file_typesmap(string)Map from file suffixes, which must begin with a period and contain no periods, t{ ".3g2": "video/3gpp2", ".3gp": "vi
default_file_typestringThe Content-Type value to use for any files that don't match one of the suffixes"application/octet-stream"
template_varsanyVariables to make available for interpolation and other expressions in template {}
template_file_suffixstringThe filename suffix that indicates that a file is a Terraform template file rath".tmpl"
Outputs (3)
files — Map from relative file paths to objects describing all of the files. See the module README for more
files_on_disk — A filtered version of the files output that includes only entries that point to static files on disk
files_in_memory — A filtered version of the files output that includes only entries that have rendered content in memo
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.2
Cloud TEMPLATE
★ Stars32
Forks12
Total downloads149.9k
Inputs5
Outputs3
LicenseMIT
Namespaceapparentlymart
Updated