build-with-cleanup

glenngillen/build-with-cleanup/gg

Terraform Module HCL GG

Enabled build commands, compressing, and then cleanup as a Terraform module.

Install
module "build-with-cleanup" {
source = "glenngillen/build-with-cleanup/gg"
version = "1.0.2"
}
plain text: /constructs/tfmod-glenngillen-build-with-cleanup-gg/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform build with cleanup stage If you're using Terraform in a way that can manipulate the local filesystem (e.g., local-exec), it's possible your commands might leave some artefacts lying around. Artefacts that later cause problems when trying to generate checksums for whether files have changed 🤦‍♂️. This module helps alleviate the problem by running a separate cleanup command once your build command is finished. Usage ``hcl module "build" { source = "glenngillen/build-with-cleanup/module" version = "1.0.2" working_dir = "app/path/here" build_command = world.txt EOF source_dir = "app/path/here/build" output_file = "${path.cwd}/build.zip" cleanup_command = "rm -rf world.txt" } ``

Inputs (7)
NameTypeDescriptionDefault
working_dirstring required
build_commandstring required
source_dirstring required
output_filestring required
cleanup_commandstring required
tagsmap{}
triggersmap{}
Outputs (2)
output_path
source_code_hash
Resources (1)
null_resource
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.2
Cloud GG
★ Stars0
Forks0
Total downloads146
Inputs7
Outputs2
Resources1
LicenseApache-2.0
Namespaceglenngillen
Updated