command-exists

Invicton-Labs/command-exists/external

Terraform Module HCL EXTERNAL

A Terraform module that determines whether a given command is available on the CLI (Unixshell or Windows PowerShell).

Install
module "command-exists" {
source = "Invicton-Labs/command-exists/external"
version = "0.2.0"
}
plain text: /constructs/tfmod-invicton-labs-command-exists-external/install.txt
⭐ Source on GitHub 📦 Registry page
README

Command Exists Determines whether a given command is available on the CLI (Linux shell or Windows PowerShell). During a terraform import, it will return null (since the external data source isn't run during an import). Usage: `` // Check if Git is installed and available module "command_exists" { source = "Invicton-Labs/command-exists/external" // The command to look for on Unix systems command_unix = "git" // The command to look for on Windows systems // This is technically not required because if only command_unix or command_windows is specified, // it will be used on both operating system types command_windows = "git" // Specify the working directory if the command is not installed system-wide working_dir = path.root // If Git isn't installed, fail Terraform so that nothing gets planned

Inputs (4)
NameTypeDescriptionDefault
working_dirstringThe directory to check for the command in. Defaults to the module directory. required
command_unixstringThe command to check for on unix-based systems. If not provided, the `command_wi required
command_windowsstringThe command to check for on Windows systems. If not provided, the `command_unix` required
fail_if_command_missingboolWhether to fail the Terraform plan/apply if the given command isn't available.false
Outputs (4)
command_windows — The value of the `command_windows` input variable, or the default value if the input was `null`.
command — The command that was tested (either the `command_unix` or `command_windows` input variable, dependin
exists — Whether the given command exists.
command_unix — The value of the `command_unix` input variable, or the default value if the input was `null`.
Details
FrameworkTerraform Module
LanguageHCL
Version0.2.0
Cloud EXTERNAL
Total downloads865
Inputs4
Outputs4
NamespaceInvicton-Labs
Updated