Closed marina-chibizova closed 1 year ago
@marina-chibizova Will try to replicate issue
@marina-chibizova I was able to import one I created but it did bring up your error in option 1 will track a fix for this in INTMDB-648
just as an update @marina-chibizova this issue has been picked up for v1.8.2 release which should be published in the next month or two.
Terraform CLI and Terraform MongoDB Atlas Provider Version
Terraform Configuration File
Steps to Reproduce
Option 1 - trying to add an online archive to a timeseries collection
terraform init
Option 2 - importing manually created online archive with timeseries type
terraform import mongodbatlas_online_archive.users_archive <project_id>-<cluster_name>-<archive_id>
Expected Behavior
Option 1 After a successful run in terraform, a new online archive is expected to appear in Mongo and the documents matching defined criteria (the current date is greater than the value of the date field specified here plus the number of days specified via the expire_after_days parameter)
Option 2 Import existing timeseries online archive in terraform
Actual Behavior
Option 1 Online archive is created in Mongo, but the following error appears: Error starting archive: archive collection type does not match the collection type found
Option 2
Error: could not import Online Archive <archive_id> in project <project_id>, error GET https://cloud.mongodb.com/api/atlas/v1.0/groups/<project_id>/clusters/cluster_name/onlineArchives/<archive_id>: 404 (request "RESOURCE_NOT_FOUND") Cannot find resource Online archive with id <archive_id>.
Additional Context
Nowhere in the set up process there is a place to define collection type (timeseries). type =
DATE
refers to archiving criteria, but not to the collection type itself. While UI provides this as a checkbox when creating an archive.Reference
https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Online-Archive/operation/createOnlineArchive