---
layout: "fastly"
page_title: "Fastly: dns_zone"
sidebar_current: "docs-fastly-resource-dns_zone"
description: |-
  Provides a Fastly DNS Zone.
---

# fastly_dns_zone

Provides a Fastly DNS Zone.

## Example Usage

```terraform
resource "fastly_dns_zone" "example" {
    name        = "example.com."
    description = "My secondary DNS zone"

    xfr_config_inbound {
      inbound_tsig_key_id = fastly_tsig_key.example.id

      primaries {
        address     = "192.0.2.1"
        description = "Primary nameserver #1"
      }

      primaries {
        address     = "192.0.2.2"
        description = "Primary nameserver #1"
      }
    }
  }
```

## Import

Fastly DNS Zones can be imported using their Zone ID, e.g.

```sh
$ terraform import fastly_dns_zone.example xxxxxxxxxxxxxxxxxxxx
```

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

### Required

- `name` (String) The domain name for your zone in FQDN format (e.g. `example.com.`). Must include a trailing dot.

### Optional

- `description` (String) A freeform descriptive note.
- `xfr_config_inbound` (Block List, Max: 1) All attributes associated with inbound zone transfers. (see [below for nested schema](#nestedblock--xfr_config_inbound))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--xfr_config_inbound"></a>
### Nested Schema for `xfr_config_inbound`

Optional:

- `inbound_tsig_key_id` (String) The ID of the TSIG key used to secure inbound zone transfers.
- `primaries` (Block List) An array of the primary DNS server objects associated with inbound zone transfers. (see [below for nested schema](#nestedblock--xfr_config_inbound--primaries))

<a id="nestedblock--xfr_config_inbound--primaries"></a>
### Nested Schema for `xfr_config_inbound.primaries`

Optional:

- `address` (String) An IPv4 address for the Primary DNS Server.
- `description` (String) A description of the Primary DNS server.
