get_platform
unitstack
Usage
get_platform() --> stringget_platform returns the Go name of the operating system: darwin, freebsd, linux, or windows.
locals { is_windows = get_platform() == "windows" setup_script = local.is_windows ? "setup.ps1" : "setup.sh"}Examples
inputs = { platform = get_platform() # "darwin" on macOS}