# ionoscloud\_datacenter

The **Datacenter data source** can be used to search for and return an existing Virtual Data Center. You can provide a string for the name and location parameters which will be compared with provisioned Virtual Data Centers. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

## Example Usage

### By ID

```hcl
data "ionoscloud_datacenter" "example" {
  id       = "datacenter_id"
}
```

### By Name & Location

```hcl
data "ionoscloud_datacenter" "example" {
  name     = "Datacenter Example"
  location = "us/las"
}
```

## Argument Reference

* `id` - (Optional) Id of an existing Virtual Data Center that you want to search for.
* `name` - (Optional) Name of an existing Virtual Data Center that you want to search for.
* `location` - (Optional) Id of the existing Virtual Data Center's location. Available locations: `de/fra`, `us/las`, `us/ewr`, `de/txl`, `gb/lhr`, `gb/bhx`, `es/vit`, `fr/par`, `us/mci`, `de/fra/2`

Either `name`, `location` or `id` must be provided. If none, the datasource will return an error.

## Attributes Reference

The following attributes are returned by the datasource:

* `id` - UUID of the Virtual Data Center
* `name` - The name of the Virtual Data Center
* `location` - The regional location where the Virtual Data Center is created
* `description` - Description for the Virtual Data Center
* `version` - The version of that Data Center. Gets incremented with every change
* `features` - List of features supported by the location this data center is part of
* `sec_auth_protection` - Boolean value representing if the data center requires extra protection e.g. two factor protection
* `cpu_architecture` - Array of features and CPU families available in a location
  * `cpu_family` - A valid CPU family name
  * `max_cores` - The maximum number of cores available
  * `max_ram` - The maximum number of RAM in MB
  * `vendor` - A valid CPU vendor name


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/terraform-provider/data-sources/datacenter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
