<!-- llms-explorer concept facts · https://llms-explorer.com/tree/pause-resume-automation-with-terraform-or-github-actions/ · pack 2026-10-24 · ~2269 tokens -->

# Pause/resume automation with Terraform or GitHub Actions

> Source-anchored research for Pause/resume automation with Terraform or GitHub Actions. Run status: COMPLETED.

Parent: [Atlas Cost Planning: Region Pricing, Estimation, Scheduled Scaling and Competitor TCO](https://llms-explorer.com/tree/atlas-cost-planning-region-pricing-estimation-scheduled-scaling-and-competitor-tco/) · 5 facets · 21 facts · page: https://llms-explorer.com/tree/pause-resume-automation-with-terraform-or-github-actions/

## How it works

- The provider documents CANNOT_UPDATE_PAUSED_CLUSTER when configuration updates target a paused cluster. Resume it before applying other configuration changes; a paused cluster is not available for ordinary configuration updates. (high confidence) (verified as of 2026-10-23) — [source](https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/advanced_cluster.md)
- A June 2023 user incident reported database triggers entering a failed state after overnight cluster pauses. The response recommended disabling triggers before pausing, then resuming the cluster before enabling triggers. This is historical guidance requiring current API verification. (low confidence) — [source](https://www.mongodb.com/community/forums/t/triggers-failing-when-cluster-suspended-overnight/233376)
- When Atlas automatically resumes a cluster after 30 days, Terraform detects the changed paused state. If an external scheduler owns pause/resume, lifecycle { ignore_changes = [paused] } delegates update reconciliation for that attribute; it also means changing paused in Terraform will no longer control subsequent updates. (high confidence) (verified as of 2026-10-23) — [source](https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/advanced_cluster.md)

## Measurements and reference values

- Atlas resumes an M10+ cluster after at most 30 paused days and requires a resumed cluster to run for at least 60 minutes before another pause. Pausing requires a healthy cluster with disk usage below 95%. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/pause-terminate-cluster.md)

## Problems, failure modes and limitations

- Manual pause automation targets M10+ clusters without NVMe storage. Flex clusters cannot be paused. Paused clusters retain storage charges, so stopping compute does not make the environment free. (high confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/pause-terminate-cluster.md)
- For scheduled OneUptime workflow runs without an input, the example chooses resume only when the runner clock reports 08 UTC; the manual workflow_dispatch input can choose either action at any hour. The curl -s request is followed by an unconditional success message without checking HTTP status. Because GitHub may delay scheduled runs, copying the scheduled path unchanged can choose the wrong action; route scheduled actions using github.event.schedule and add HTTP error handling. (medium confidence) — [source](https://oneuptime.com/blog/post/2026-03-31-mongodb-atlas-pause-resume-clusters/markdown)
- A 2018 issue in the older akshaykarle Terraform provider reported HTTP 409 Cannot update and pause cluster at the same time. It is historical evidence of operation-ordering failures, not proof that the current MongoDB-maintained provider has that bug. (low confidence) — [source](https://github.com/akshaykarle/terraform-provider-mongodbatlas/issues/47)
- Manual pause is supported for M10+ clusters without NVMe storage. Free clusters cannot be manually paused, and Flex clusters cannot be paused. Eligibility must be checked before enabling a scheduled job. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/pause-terminate-cluster.md)

## Comparisons and alternatives

- The mongodbatlas_advanced_cluster resource exposes a paused Boolean. A scheduler must change the desired value and apply it; the documented flag is a state setting rather than a start/end scheduling window. Issue #861 records the request for such a window. (medium confidence) (verified as of 2026-10-23) — [source](https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/advanced_cluster.md)
- GitHub schedules default to UTC and currently support an optional IANA timezone. Public repositories disable scheduled workflows after 60 days without activity. Separate scheduled operations using github.event.schedule rather than inferring the intended action from actual execution time. (low confidence) (verified as of 2026-10-24) — [source](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule)
- Code-review inference: For scheduled runs, OneUptime's example chooses resume only if the runner's current UTC hour is 08 and chooses pause otherwise. A morning scheduled run delayed into a later hour can therefore pause instead. The sample already accepts an explicit workflow_dispatch action; route scheduled actions from github.event.schedule rather than execution time. (medium confidence) — [source](https://oneuptime.com/blog/post/2026-03-31-mongodb-atlas-pause-resume-clusters/markdown)

## Facts and statements

- Off-hours automation pauses eligible Atlas database clusters; it does not pause the App Services application itself. A GitHub Actions workflow can schedule Atlas Admin API PATCH requests with paused=true or paused=false. (medium confidence) (verified as of 2026-03-31) — [source](https://oneuptime.com/blog/post/2026-03-31-mongodb-atlas-pause-resume-clusters/markdown)
- Atlas automatically resumes a cluster after 30 days paused and requires at least 60 minutes running after resume before another pause. Automation must respect both boundaries. (high confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/pause-terminate-cluster.md)
- If an external scheduler or Atlas changes paused state, Terraform can detect drift and restore its configured value. The provider documents lifecycle { ignore_changes = [paused] } to accept external state changes; choosing this delegates updates to that attribute away from Terraform. (medium confidence) (verified as of 2026-10-23) — [source](https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/advanced_cluster.md)
- GitHub scheduled workflows run from the default branch and may be delayed or dropped under load, especially near the start of an hour. Do not treat the schedule as an exact availability guarantee. (low confidence) (verified as of 2026-10-24) — [source](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule)
- Resume requests should be followed by readiness checks before application workloads. OneUptime polls stateName until IDLE; Atlas warns queued maintenance can delay availability after unpausing. (medium confidence) — [source](https://oneuptime.com/blog/post/2026-03-31-mongodb-atlas-pause-resume-clusters/markdown)
- The current mongodbatlas_advanced_cluster resource exposes paused. A MongoDB forum update dated 2022-02-02 also records paused support in version 1.2.0 for the older mongodbatlas_cluster resource, superseding the thread's 2021 statement that Terraform could not pause clusters. (high confidence) (verified as of 2026-10-23) — [source](https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/advanced_cluster.md)
- Pausing retains storage charges, blocks database reads and writes, and stops backups and configured alerts. Search Node data is deleted and indexes rebuild on resume; queued maintenance may delay availability. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/pause-terminate-cluster.md)
- Atlas CLI provides atlas clusters pause <clusterName> and atlas clusters start <clusterName>. Pause/resume requires Project Cluster Manager access or higher; these operations can be invoked by an external scheduler without an App Services function. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/pause-terminate-cluster.md)
- GitHub scheduled workflows run from the latest commit on the default branch. They use UTC by default, optionally accept an IANA timezone, and have a minimum interval of five minutes. Public-repository schedules are disabled after 60 days without repository activity. (low confidence) (verified as of 2026-10-24) — [source](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule)
- GitHub warns that scheduled workflows can be delayed or dropped under high load, especially at the start of an hour. Off-hour minute offsets reduce contention but do not establish an exact resume-time guarantee. (low confidence) (verified as of 2026-10-24) — [source](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule)
