CLI Configurationยป
OpenTofu
This page applies to native OpenTofu stacks as well. Spacelift writes and merges the same ~/.terraformrc file for OpenTofu runs, and OpenTofu reads it whenever no .tofurc is present, so keep using *.terraformrc mounted files and do not mount a .tofurc that would shadow the Spacelift-provided credentials.
For some of our Terraform users, a convenient way to configure the Terraform CLI behavior is through customizing the ~/.terraformrc file.
During the preparing phase of a run, Spacelift creates a configuration file at the default location: ~/.terraformrc. This file contains credentials that are needed to communicate with remote services.
Extending CLI configurationยป
Extending the Terraform CLI behavior can be done by using mounted files:
Using mounted filesยป
Any mounted files with names ending in .terraformrc will be appended to ~/.terraformrc.
Info
The Terraform CLI configuration file syntax supports these settings