Terraspace builds a terraform project from files like
app/stacks. Files that end with
.rb get processed with different strategies as part of being built.
|.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:
$ terraspace build demo $ ls .terraspace-cache/us-west-2/dev/stacks/demo/files/ lambda_function.rb $
You can configure additional patterns to use the pass strategy.
Terraspace.configure do |config| config.build.pass_files = ["myfiles"] end