TagArgs

data class TagArgs(val name: Output<String>? = null) : ConvertibleToJava<TagArgs>

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

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Tag;
import com.pulumi.digitalocean.Droplet;
import com.pulumi.digitalocean.DropletArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foobar = new Tag("foobar");
var web = new Droplet("web", DropletArgs.builder()
.image("ubuntu-18-04-x64")
.region("nyc3")
.size("s-1vcpu-1gb")
.tags(foobar.id())
.build());
}
}

Import

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

$ pulumi import digitalocean:index/tag:Tag mytag tagname

Constructors

Link copied to clipboard
fun TagArgs(name: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): TagArgs

Properties

Link copied to clipboard
val name: Output<String>? = null

The name of the tag