> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/tools-terraform/docs/data-sources/mongo_snapshots_v2.md).

# ionoscloud\_mongo\_snapshots\_v2

Lists IONOS CLOUD MongoDB V2 Snapshots.

The `ionoscloud_mongo_snapshots_v2` data source can be used to retrieve information about MongoDB V2 snapshots in a given location, with an optional filter by cluster ID.

## Example Usage

```hcl
data "ionoscloud_mongo_snapshots_v2" "all" {
  location = "gb/bhx"
}

data "ionoscloud_mongo_snapshots_v2" "by_cluster" {
  location   = "gb/bhx"
  cluster_id = "example-cluster-id"
}
```

## Argument Reference

* `location` - (Required)\[string] The location to query. Available locations: `gb/bhx`, `us/ewr`.
* `cluster_id` - (Optional)\[string] Filter snapshots by the cluster they belong to.

## Attributes Reference

The following attributes are returned by the datasource:

* `items` - List of snapshots. Each item exposes:
  * `id` - The UUID of the snapshot.
  * `cluster_id` - The ID of the cluster this snapshot belongs to.
  * `cluster_name` - The name of the cluster this snapshot belongs to.
  * `mongo_version` - The MongoDB version of the cluster at snapshot time.
  * `location` - The Object Storage location where the snapshot is stored.
  * `total_size` - The total size of the snapshot in Mebibytes (MiB).
  * `required_storage_size` - The minimum storage size required to restore this snapshot, in Mebibytes (MiB).
  * `earliest_recovery_target_time` - The earliest point in time to which the cluster can be restored from this snapshot.
  * `latest_recovery_target_time` - The latest point in time to which the cluster can be restored. Null if the snapshot can be restored up to the current time.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/tools-terraform/docs/data-sources/mongo_snapshots_v2.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
