Skip to content

commands.accept_vars

unitstacklist(string)

A field of the commands variable.

Usage

commands.accept_vars holds these commands: apply, console, destroy, import, plan, push, and refresh.

It has the same value as get_terraform_commands_that_need_vars().

Examples

A unit passes a shared variables file to each command that accepts it.

terragrunt.hcl
terraform {
extra_arguments "common_vars" {
commands = commands.accept_vars
arguments = ["-var-file=${get_terragrunt_dir()}/../common.tfvars"]
}
}