<!-- llms-explorer concept facts · https://llms-explorer.com/tree/online-archive-terraform-resource/ · pack 2026-10-15 · ~4241 tokens -->

# Online Archive Terraform Resource

> Depth-first rabbithole dossier for Online Archive Terraform Resource; source-anchored research pack.

Parent: [Archive Rules](https://llms-explorer.com/tree/archive-rules/) · 4 facets · 31 facts · page: https://llms-explorer.com/tree/online-archive-terraform-resource/

## Definitions

- [high] The Online Archive feature is not supported on Atlas Infinite clusters during public preview, Flex clusters, or Atlas serverless clusters. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md, https://www.mongodb.com/docs/atlas/online-archive/overview.md, https://foojay.io/today/atlas-online-archive-efficiently-manage-the-data-lifecycle/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] Online Archive is not a backup or point-in-time restore substitute, and it is not writable storage for casual corrections, so plan rehydrate flows if needed. Sources: https://dev.to/dvorlandi/atlas-online-archive-for-large-collections-keep-hot-data-hot-33fm — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`

## How it works

- [high] The Terraform provider flag to wait for the online archive state to reach IDLE or ACTIVE when creating an archive defaults to false, and the deleteOnCreateTimeout flag triggers deletion and returns immediately if a timeout occurs when set to true. Sources: https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#tools`
- [low] If you drop a database or collection configured for online archive, the archived data continues to be available, and if you delete all online archives, the federated database instance is deleted and recreated when a new archive is created. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] Blocking queries, such as sorts that process all input before returning results, have performance characteristics associated with the slower archive storage, while streaming queries like finds have performance characteristics associated with the faster Atlas cluster storage. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [high] When the current date exceeds the specified date field value, Atlas subtracts the number of days from the current time and archives data after that time, with the date field supporting ISO 8601, Epoch timestamps (nanoseconds, milliseconds, or seconds), or ObjectId formats, defaulting to ISODATE. Sources: https://www.mongodb.com/docs/atlas/online-archive/overview.md, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`

## Problems, failure modes and limitations

- [high] The data process region field in the Terraform provider is immutable and cannot be updated, and the cloud provider label AZURE may be selected only if Azure is the cluster's cloud provider and no AWS online archive has been created for the cluster. Sources: https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/, https://marketplace.upbound.io/providers/crossplane-contrib/provider-mongodbatlas/v1.4.1/resources/mongodbatlas.m.crossplane.io/OnlineArchive/v1alpha1 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#tools`
- [high] Once an online archive is created, you cannot modify the namespace, storage region, or date field, and the data process region field is immutable. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/, https://marketplace.upbound.io/providers/crossplane-contrib/provider-mongodbatlas/v1.4.1/resources/mongodbatlas.m.crossplane.io/OnlineArchive/v1alpha1 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] When updating a Mongo Online Archive, the data_process_region cannot be modified, and an error is returned if an attempt is made to change it. Sources: https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#troubleshooting`
- [medium] Five days after deleting an online archive, Atlas automatically deletes all files and metadata on the online archive storage, and this data cannot be restored. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md, https://www.mongodb.com/docs/atlas/online-archive/overview.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] If a 'reset by peer' error occurs during creation, the Terraform provider returns the state REPEATING, and the Pending state includes PENDING, ARCHIVING, PAUSING, PAUSED, ORPHANED, and REPEATING, while the Target state includes IDLE and ACTIVE. Sources: https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#troubleshooting`
- [high] You can specify up to two frequently queried fields, or up to three fields if one is the date field, to use for partitioning data, and the partition field value can be up to 700 characters, with documents exceeding this limit not archived. Sources: https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/, https://marketplace.upbound.io/providers/crossplane-contrib/provider-mongodbatlas/v1.4.1/resources/mongodbatlas.m.crossplane.io/OnlineArchive/v1alpha1 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] An HTTP 400 Bad Request error with INVALID_ATTRIBUTE can occur when specifying an invalid endHour, but removing end_hour from the schedule block allows successful apply and archive creation. Sources: https://github.com/mongodb/terraform-provider-mongodbatlas/issues/4036 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#troubleshooting`

## Facts and statements

- [high] The Terraform MongoDB Atlas Provider supports the Online Archive resource, with a default create timeout of 3 hours and a default deleteOnCreateTimeout value of true. Sources: https://www.mongodb.com/docs/atlas/release-notes/changelog.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#tools`
- [high] The Terraform provider import format for MongoDB Atlas Online Archive is {project_id}-{cluster_name}-{archive_id}, and the state status valid values are Pending, Archiving, Idle, Pausing, Paused, Orphaned, and Deleted. Sources: https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#tools`
- [high] In the Terraform provider, the `paused` argument (documented as the state of the online archive) is required for pausing an active online archive or resuming a paused one, and the resume request fails if the collection has another active online archive. The `state` attribute is a computed status. Sources: https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#troubleshooting`
- [high] MongoDB introduced the Online Archive feature in Atlas version 4.4 and later, which is supported only on dedicated clusters of tier M10 or greater. (verified as of 2026-10-15) Sources: https://foojay.io/today/atlas-online-archive-efficiently-manage-the-data-lifecycle/, https://www.mongodb.com/docs/atlas/online-archive/overview.md, https://dev.to/dvorlandi/atlas-online-archive-for-large-collections-keep-hot-data-hot-33fm — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [high] Configuring an Online Archive creates two federated database instances: one for querying archive data only and one for querying both cluster and archive data. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://foojay.io/today/atlas-online-archive-efficiently-manage-the-data-lifecycle/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [medium] Once a document is queued for archiving, you can no longer edit the document, and Online Archive deletes documents from the cluster using the _id and shard keys. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] If a cluster already has an Active online archive with the same archiving rule for the same database and collection, the operation fails, but if the existing archive is in Paused or Deleted state, the new archive is created with Active status. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] To create or delete an online archive, you must have one of the following roles: Project Data Access Admin, Project Cluster Manager, or Project Owner. Sources: https://foojay.io/today/atlas-online-archive-efficiently-manage-the-data-lifecycle/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [high] Capped collections do not support online archival, and writing to the Online Archive is not supported. Sources: https://foojay.io/today/atlas-online-archive-efficiently-manage-the-data-lifecycle/, https://www.mongodb.com/docs/atlas/online-archive/overview.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] The Crossplane provider-mongodbatlas v1.4.1 (not the Terraform provider) includes beta fields for Management Policies, which are honored unless the Management Policies feature flag is disabled, and a beta field that is on by default but can be opted out through a Crossplane feature flag. (verified as of 2026-10-15) Sources: https://marketplace.upbound.io/providers/crossplane-contrib/provider-mongodbatlas/v1.4.1/resources/mongodbatlas.m.crossplane.io/OnlineArchive/v1alpha1 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#tools`
- [low] Before configuring an Online Archive, ensure the Atlas cluster is healthy, as the archive remains in PENDING status if one node is down until the cluster is fully operational. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#troubleshooting`
- [low] MongoDB charges a fee for each partition queried in the archive, where each downloaded partition corresponds to a single access, and Atlas runs operations to find up to 1000 partitions per operation to satisfy the query. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [high] Atlas determines the data type of a partition field by sampling 10 documents from the collection, and partition parameters of type UUID must be of binary subtype 4, with subtype 3 parameters skipped. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] Atlas will not archive a document if the specified field value does not match values in other documents in the same collection, and the archive must have at least one partition field. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [high] Archiving jobs consume cluster resources, so ensure the Atlas cluster has sufficient capacity to support both active workloads and archiving tasks to avoid resource constraints. Sources: https://www.mongodb.com/docs/atlas/online-archive/overview.md, https://dev.to/dvorlandi/atlas-online-archive-for-large-collections-keep-hot-data-hot-33fm — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] Indexes offer better performance during archival, and you can modify, pause, and delete online archival rules at any time. Sources: https://foojay.io/today/atlas-online-archive-efficiently-manage-the-data-lifecycle/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#core`
- [low] The partition sequence in the Terraform provider starts with zero, and the dateField parameter defaults as the first item in the partition sequence. Sources: https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#tools`
- [low] To ensure data loss does not occur, pause the archive before performing sharding operations and refrain from updating documents once they become eligible for archival. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/online-archive-terraform-resource-43a484e3b1/rabbithole-synthesis.md#antipatterns`

## Related concepts

- Archive — is a part of Online Archive Terraform Resource
- Online — is a part of Online Archive Terraform Resource
- Resource — is a part of Online Archive Terraform Resource
- Terraform — is a part of Online Archive Terraform Resource
