file-filter

aledsdavies/file-filter/util

Terraform Module HCL UTIL

This is a Terraform module for getting the file paths and adding configurations to files based on the file type. See the examples for use cases

Install
module "file-filter" {
source = "aledsdavies/file-filter/util"
version = "0.1.0"
}
plain text: /constructs/tfmod-aledsdavies-file-filter-util/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform module for filtering file This is a util-only Terraform module that filters all the files in a directory based on the filter criteria. It will then merge Usage ``hcl module "file-filter" { source = "aledsdavies/file-filter/util" version = "0.1.0" # insert the 2 required variables here base_dir = "../build" // You can insert multiple filters into the array to configure different file types individually filters = [ { // The regex value is used to filter regex : ".html$" // This field is the only required field // Additional values can be added and these will get merged with the output contentType = "text/html" cacheControl = "Cache-Control: max-age=0" }, ] } ` Example output based the example in usage `hcl + files = { + files = { + subfolder/subfolder.html = { + cacheControl = "Cac

Inputs (2)
NameTypeDescriptionDefault
base_dirstringThe source location where you can find the files relative to the terraform required
filterslist(map(any))The file filter use this to filter the files and add configurations required
Outputs (1)
files — A map of the files that have been filtered that can be used directly in a for_each
Details
FrameworkTerraform Module
LanguageHCL
Version0.1.0
Cloud UTIL
★ Stars0
Forks2
Total downloads1.5k
Inputs2
Outputs1
Examples1
LicenseMIT
Namespacealedsdavies
Updated