Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (39 sloc) 1.12 KB
layout page_title sidebar_current description
DigitalOcean: digitalocean_tag
Provides a DigitalOcean Tag resource.


Provides a DigitalOcean Tag resource. A Tag is a label that can be applied to a Droplet resource in order to better organize or facilitate the lookups and actions on it. Tags created with this resource can be referenced in your Droplet configuration via their ID or name.

Example Usage

# Create a new tag
resource "digitalocean_tag" "foobar" {
  name = "foobar"

# Create a new Droplet in nyc3 with the foobar tag
resource "digitalocean_droplet" "web" {
  image  = "ubuntu-18-04-x64"
  name   = "web-1"
  region = "nyc3"
  size   = "s-1vcpu-1gb"
  tags   = ["${}"]

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the tag

Attributes Reference

The following attributes are exported:

  • id - The id of the tag
  • name - The name of the tag


Tags can be imported using the name, e.g.

terraform import digitalocean_tag.mytag tagname
You can’t perform that action at this time.