Pass Files

Terraspace builds a terraform project from files like app/stacks. Files that end with .tf, .tfvars and .rb get processed with different strategies as part of being built.

Extensions Strategy
.tf and .tfvars Will be processed with ERB. This allows add a little extra power to the Terraform HCL language with templating logic.
.rb Will be processed by the Terraspace Ruby DSL. This allows you to write Terraform code with Ruby.

There are cases where it makes sense to do no processing at all. For example, lambda function ruby files like lambda_function.rb should not be processed by the Terraspace DSL.


By default, the files folder within modules or stacks will be copied straight to the build cache without any processing. This is call the “pass” strategy. For example:


Will build:

$ terraspace build demo
$ ls .terraspace-cache/us-west-2/dev/stacks/demo/files/


You can configure additional patterns to use the pass strategy.


Terraspace.configure do |config| = ["myfiles"]

More tools: