Terragrunt: New interpolation function for plan files

Created on 13 Sep 2017  路  3Comments  路  Source: gruntwork-io/terragrunt

After adapting the scripts to use plan files, I noticed that I can no longer use this function get_terraform_commands_that_need_vars(). The apply command doesn't take var parameters when using the plan file.

Instead of listing all the commands in all the tfvars files, I would prefer to continue to use the portability of a function.

I'd like to ask for an additional function that includes commands that need vars, except apply.
get_terraform_commands_that_need_vars_for_planfile()

enhancement help wanted

All 3 comments

Seems reasonable. Another alternative is to have a more general-purpose helper along the lines of filter or exclude:

exclude(get_terraform_commands_that_need_vars(), ["apply"])

PRs welcome :)

That would be beneficial too 馃憤

In my view the ideal scenario would be that the existing function get_terraform_commands_that_need_vars would return two different lists of commands, depending on whether a plan file is being applied or not. Therefore, apply would be included in the returned list of commands if no plan file is being applied, and excluded otherwise.

Was this page helpful?
0 / 5 - 0 ratings