shell-data

BrynardSecurity-terraform/shell-data/external

Terraform Module HCL EXTERNAL
Install
module "shell-data" {
source = "BrynardSecurity-terraform/shell-data/external"
version = "0.3.2"
}
plain text: /constructs/tfmod-brynardsecurity-terraform-shell-data-external/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform Shell (Data) On the Terraform Registry: Invicton-Labs/shell-data/external This module provides a wrapper for running shell scripts as data sources (re-run on every plan/apply) and capturing the output. Unlike Terraform's standard External Data Source, this module supports: - Environment variables - Capturing stdout, stderr, and exit_code of the command - Built-in support for both Unix and Windows - Optional Terraform failure when an error in the given command occurs For Windows, this module should work on any system that supports a relatively modern version of PowerShell. For Unix, this module should work on any system that supports sed and base64 (which is the vast majority of out-of-the-box systems). For a similar module that runs as a resource (only re-runs the command on reso

Inputs (8)
NameTypeDescriptionDefault
timeoutnumberThe maximum number of seconds to allow the shell command to execute for If it e required
command_unixstringThe command to run on creation when the module is used on a Unix machine. If not required
command_windowsstringThe command to run on creation when the module is used on a Windows machine. If required
fail_on_nonzero_exit_codeboolWhether a Terraform error should be thrown if the command exits with a non-zero true
fail_on_stderrboolWhether a Terraform error should be thrown if the command outputs anything to stfalse
force_wait_for_applyboolWhether to force this module to wait for apply-time to execute the shell commandfalse
environmentmap(string)Map of environment variables to pass to the command.{}
working_dirstringThe working directory where command will be executed. Defaults to this module's "./"
Outputs (3)
stdout — The stdout output of the shell command.
stderr — The stderr output of the shell command.
exit_code — The exit status code of the shell command.
Details
FrameworkTerraform Module
LanguageHCL
Version0.3.2
Cloud EXTERNAL
★ Stars0
Forks0
Total downloads381
Inputs8
Outputs3
LicenseMIT
NamespaceBrynardSecurity-terraform
Updated