mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Make persist interval for remote state backend configurable (#1591)
Signed-off-by: Alex Ott <alexott@gmail.com> Co-authored-by: Siddhartha Sonker <158144589+siddharthasonker95@users.noreply.github.com>
This commit is contained in:
@@ -174,6 +174,14 @@ export TF_PROVIDER_DOWNLOAD_RETRY=3
|
||||
|
||||
For more details on `.terraformignore`, please see [Excluding Files from Upload with .terraformignore](../../language/settings/backends/remote.mdx#excluding-files-from-upload-with-terraformignore).
|
||||
|
||||
## TF_STATE_PERSIST_INTERVAL
|
||||
|
||||
Set `TF_STATE_PERSIST_INTERVAL` to configure the interval (in seconds) between state persistence. Increased interval could be useful when working with huge states (> 100k resources) where upload to a cloud service could take a significant amount of time. Default persistence interval is 20 seconds (it also the lowest possible value for this parameter). The following command sets persistence interval to 5 minutes (300 seconds):
|
||||
|
||||
```shell
|
||||
export TF_STATE_PERSIST_INTERVAL=300
|
||||
```
|
||||
|
||||
## Cloud Backend CLI Integration
|
||||
|
||||
The CLI integration with cloud backends lets you use them on the command line. The integration requires including a `cloud` block in your OpenTofu configuration. You can define its arguments directly in your configuration file or supply them through environment variables, which can be useful for non-interactive workflows like Continuous Integration (CI).
|
||||
|
||||
Reference in New Issue
Block a user