---
layout: "fastly"
page_title: "Fastly: fastly_datacenters"
sidebar_current: "docs-fastly-datasource-fastly_datacenters"
description: |-
  Get information on Fastly datacenters.
---

# fastly_datacenters

Use this data source to get the list of the [Fastly datacenters][1].

## Example Usage

```terraform
data "fastly_datacenters" "fastly" {}

output "fastly_datacenters_all" {
  value = data.fastly_datacenters.fastly
}

output "fastly_datacenters_filtered" {
  # get the shield code of "TYO" POP
  value = one([for pop in data.fastly_datacenters.fastly.pops : pop.shield if pop["code"] == "TYO"])
}
```

[1]: https://developer.fastly.com/reference/api/utils/pops/

<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `id` (String) The ID of this resource.
- `pops` (List of Object) A list of all Fastly POPs. (see [below for nested schema](#nestedatt--pops))

<a id="nestedatt--pops"></a>
### Nested Schema for `pops`

Read-Only:

- `code` (String)
- `group` (String)
- `name` (String)
- `shield` (String)
