You can configure the backend for terraform to use with
Below are examples.
You may also be interested in:
When you run
terraspace commands, it will use the files in the
config/terraform folder and builds them with the deployed module. For example, let’s say you have an
├── app │ ├── modules │ │ └── instance │ └── stacks │ └── demo └── config └── terraform └── backend.tf
terraspace up demo
.terraspace-cache/dev/stacks/demo/backend.tf using the
config/terraform/backend.tf. If you want to just build the files without deploying, you can also use
For variables available see Backend Config Variables
Cleanup Behavior: Strip Trailing and Remove Double Slashes
Terraspace expansion will remove the trailing dashes and slashes in case the instance option is at the end and is not set. For example, let’s say
INSTANCE is not set.
Will result in:
us-west-2/dev/demo # notice there's no trailing slash
Also, consecutive double slashes like
// are squeezed into a single slash
/. This done for the case when a variable inbetween the slashes is not set. However, if the
// is part of
https://, then the
// is kept.