Interview Prep/Terraform/State and Backends in Production

What lifecycle policy do you put on the state bucket?

BeginnerProductionState and Backends in Production
Answer

Keep current versions forever, expire noncurrent versions after 90 to 365 days (enough to roll back), abort incomplete multipart uploads and clean up expired delete markers. Be careful not to expire so aggressively that you cannot restore after a slow-burn corruption.

noncurrent_version_expiration { noncurrent_days = 180 }
All Terraform questions Roadmap: Terraform in production

More on State and Backends in Production