get_terraform_commands_that_need_input
unitstack
Usage
get_terraform_commands_that_need_input() --> list(string)get_terraform_commands_that_need_input returns apply, import, init, plan, and refresh. Use it as the commands of an extra_arguments block that passes -input, e.g. to fail instead of prompting for a variable with no value:
terraform { extra_arguments "disable_input" { commands = get_terraform_commands_that_need_input() arguments = ["-input=false"] }}Examples
locals { commands = get_terraform_commands_that_need_input() # ["apply", "import", "init", "plan", "refresh"]}