---
title: digitalocean_byoip_prefix
description: Provides a DigitalOcean BYOIP (Bring Your Own IP) prefix resource. This can be used to create, modify, and delete BYOIP prefixes.
product: Reference
url: https://docs.digitalocean.com/reference/terraform/reference/resources/byoip_prefix/
last_updated: "2026-10-05"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# digitalocean_byoip_prefix

Generated on 5 Oct 2026 from Terraform version [`v2.104.0`](https://github.com/digitalocean/terraform-provider-digitalocean/releases/tag/v2.104.0)

Provides a DigitalOcean BYOIP (Bring Your Own IP) prefix resource. This can be used to create, modify, and delete BYOIP prefixes.

BYOIP prefixes allow you to bring your own IP address space to DigitalOcean. You can use this feature to maintain your IP reputation or meet specific compliance requirements.

BYOIP prefix provisioning documentation: [https://docs.digitalocean.com/products/networking/reserved-ips/how-to/provision-byoip/](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/provision-byoip/index.html.md)

Note: By default, newly provisioned BYOIP prefixes are not advertised to the internet. After the initial `terraform apply`, BYOIP provisioning request is initiated and DigitalOcean provisions the prefix, the prefix status changes to Active. At this point, you can initiate advertising prefix to the internet by setting field `advertised = true` and apply the configuration to make your prefix fully usable and accessible from the internet.

## Example Usage

```hcl
# Create a new BYOIP prefix
resource "digitalocean_byoip_prefix" "example" {
  prefix     = "192.0.2.0/24"
  signature  = var.prefix_signature
  region     = "nyc3"
  advertised = false
}
```

## Argument Reference

The following arguments are supported:

- `prefix` - (Required) The CIDR notation of the prefix (e.g., “192.0.2.0/24”).
- `signature` - (Required) The cryptographic signature proving ownership of the prefix. This is required during creation but can be omitted in subsequent updates.
- `region` - (Required) The DigitalOcean region where the prefix will be deployed.
- `advertised` - (Optional) A boolean indicating whether the prefix should be advertised. Defaults to `false`.

## Attributes Reference

In addition to the above arguments, the following attributes are exported:

- `id`: The UUID of the BYOIP prefix.
- `uuid`: The UUID of the BYOIP prefix.
- `status`: The current status of the BYOIP prefix (e.g., “verified”, “pending”, “failed”).
- `failure_reason`: The reason for failure if the status is “failed”.

## Import

BYOIP prefixes can be imported using the prefix `uuid`, e.g.

```
terraform import digitalocean_byoip_prefix.example 506f78a4-e098-11e5-ad9f-000f53306ae1
```