---
title: digitalocean_container_registry
description: Provides a DigitalOcean Container Registry resource. A Container Registry is a secure, private location to store your containers for rapid deployment.
product: Reference
url: https://docs.digitalocean.com/reference/terraform/reference/resources/container_registry/
last_updated: "2026-11-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_container_registry

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

Provides a DigitalOcean Container Registry resource. A Container Registry is a secure, private location to store your containers for rapid deployment.

## Example Usage

```hcl
# Create a new container registry
resource "digitalocean_container_registry" "foobar" {
  name                   = "foobar"
  subscription_tier_slug = "starter"
}
```

## Argument Reference

The following arguments are supported:

- `name` - (Required) The name of the container_registry
- `subscription_tier_slug` - (Required) The slug identifier for the subscription tier to use (`starter`, `basic`, or `professional`)
- `region` - (Optional) The slug identifier of for region where registry data will be stored. When not provided, a region will be selected automatically.

## Attributes Reference

The following attributes are exported:

- `id` - The id of the container registry
- `name` - The name of the container registry
- `subscription_tier_slug` - The slug identifier for the subscription tier
- `region` - The slug identifier for the region
- `endpoint` - The URL endpoint of the container registry. Ex: `registry.digitalocean.com/my_registry`
- `server_url` - The domain of the container registry. Ex: `registry.digitalocean.com`
- `storage_usage_bytes` - The amount of storage used in the registry in bytes.
- `created_at` - The date and time when the registry was created

## Import

Container Registries can be imported using the `name`, e.g.

```
terraform import digitalocean_container_registry.myregistry registryname
```