Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make persistence interval configurable for the remote state backend #35115

Closed
alexott opened this issue May 6, 2024 · 0 comments · Fixed by #35176
Closed

Make persistence interval configurable for the remote state backend #35115

alexott opened this issue May 6, 2024 · 0 comments · Fixed by #35176
Labels
enhancement new new issue not yet triaged

Comments

@alexott
Copy link
Contributor

alexott commented May 6, 2024

Terraform Version

1.8.1

Use Cases

When state size increases, the persistence of the state becomes a bottleneck as it happens synchronously. Currently, the persist interval is hardcoded in local apply backend to 20 seconds, and as state size increases, it becomes a significant amount of time spent on the persisting.

For remote apply backend it's possible to disable intermediate persistence completely, but it's not possible to do for the local apply backend.

Attempted Solutions

I have code changes that allow to specify a new persist interval via an environment variable.

Proposal

Make the persist interval configurable (or allow you to disable it completely) instead of using a hardcoded value. Open question: How to specify it: Is it enough to provide support via an environment variable, or will we need to add support for the command-line option?

Also, maybe it makes sense to make actual cloud write async?

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new new issue not yet triaged
Projects
None yet
1 participant