Skip to content

get_platform

unitstack

Usage

get_platform() --> string

get_platform returns the Go name of the operating system: darwin, freebsd, linux, or windows.

terragrunt.hcl
locals {
is_windows = get_platform() == "windows"
setup_script = local.is_windows ? "setup.ps1" : "setup.sh"
}

Examples

terragrunt.hcl
inputs = {
platform = get_platform() # "darwin" on macOS
}