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:
Alex Ott
2024-05-28 19:47:16 +02:00
committed by GitHub
parent 8361438c52
commit 7e1a02cbb8
4 changed files with 37 additions and 1 deletions

View File

@@ -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).