Use validate with filebase64sha256

Hello,
On my CI I plan to use “terraform validate” after every changes in *.tf files. But I found that “filebase64sha256(mylambda.zip)” that I used requires a real file to make validation work. But I don’t want to create the “mylambda.zip” every time when *.tf file changed because it now required. Is any way to make “validate” works together with “filebase64sha256”?

Hi @sluge,

As with all of Terraform’s file* functions, this one is intended for files that are checked in to your version control along with the configuration files, making them effectively part of your module, rather than something generated by your module.

If you can share a larger example of what you are working on then I might be able to suggest a different way to get the result you need, which doesn’t suggest that the file ought to be part of the configuration.