shell-data
BrynardSecurity-terraform/shell-data/external
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
| Name | Type | Description | Default |
|---|---|---|---|
| timeout | number | The maximum number of seconds to allow the shell command to execute for If it e | required |
| command_unix | string | The command to run on creation when the module is used on a Unix machine. If not | required |
| command_windows | string | The command to run on creation when the module is used on a Windows machine. If | required |
| fail_on_nonzero_exit_code | bool | Whether a Terraform error should be thrown if the command exits with a non-zero | true |
| fail_on_stderr | bool | Whether a Terraform error should be thrown if the command outputs anything to st | false |
| force_wait_for_apply | bool | Whether to force this module to wait for apply-time to execute the shell command | false |
| environment | map(string) | Map of environment variables to pass to the command. | {} |
| working_dir | string | The working directory where command will be executed. Defaults to this module's | "./" |
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.