1. Packages
  2. Packages
  3. DigitalOcean Provider
  4. API Docs
  5. Microdroplet
Viewing docs for DigitalOcean v4.77.0
published on Friday, Jul 31, 2026 by Pulumi
digitalocean logo
Viewing docs for DigitalOcean v4.77.0
published on Friday, Jul 31, 2026 by Pulumi

    Provides a DigitalOcean MicroDroplet resource. MicroDroplets run OCI images and can auto-pause when idle to reduce cost.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const example = new digitalocean.Microdroplet("example", {
        name: "example-microdroplet",
        region: "nyc3",
        size: "microdroplet-1",
        image: "docker.io/library/nginx:latest",
        httpPort: 8080,
        httpProtocol: "http",
        autoPause: {
            enabled: true,
            idleTimeout: "5m",
        },
        autoResume: true,
        environment: {
            LOG_LEVEL: "info",
        },
        tags: [
            "web",
            "prod",
        ],
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    example = digitalocean.Microdroplet("example",
        name="example-microdroplet",
        region="nyc3",
        size="microdroplet-1",
        image="docker.io/library/nginx:latest",
        http_port=8080,
        http_protocol="http",
        auto_pause={
            "enabled": True,
            "idle_timeout": "5m",
        },
        auto_resume=True,
        environment={
            "LOG_LEVEL": "info",
        },
        tags=[
            "web",
            "prod",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := digitalocean.NewMicrodroplet(ctx, "example", &digitalocean.MicrodropletArgs{
    			Name:         pulumi.String("example-microdroplet"),
    			Region:       pulumi.String("nyc3"),
    			Size:         pulumi.String("microdroplet-1"),
    			Image:        pulumi.String("docker.io/library/nginx:latest"),
    			HttpPort:     pulumi.Int(8080),
    			HttpProtocol: pulumi.String("http"),
    			AutoPause: &digitalocean.MicrodropletAutoPauseArgs{
    				Enabled:     pulumi.Bool(true),
    				IdleTimeout: pulumi.String("5m"),
    			},
    			AutoResume: pulumi.Bool(true),
    			Environment: pulumi.StringMap{
    				"LOG_LEVEL": pulumi.String("info"),
    			},
    			Tags: pulumi.StringArray{
    				pulumi.String("web"),
    				pulumi.String("prod"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new DigitalOcean.Microdroplet("example", new()
        {
            Name = "example-microdroplet",
            Region = "nyc3",
            Size = "microdroplet-1",
            Image = "docker.io/library/nginx:latest",
            HttpPort = 8080,
            HttpProtocol = "http",
            AutoPause = new DigitalOcean.Inputs.MicrodropletAutoPauseArgs
            {
                Enabled = true,
                IdleTimeout = "5m",
            },
            AutoResume = true,
            Environment = 
            {
                { "LOG_LEVEL", "info" },
            },
            Tags = new[]
            {
                "web",
                "prod",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.Microdroplet;
    import com.pulumi.digitalocean.MicrodropletArgs;
    import com.pulumi.digitalocean.inputs.MicrodropletAutoPauseArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new Microdroplet("example", MicrodropletArgs.builder()
                .name("example-microdroplet")
                .region("nyc3")
                .size("microdroplet-1")
                .image("docker.io/library/nginx:latest")
                .httpPort(8080)
                .httpProtocol("http")
                .autoPause(MicrodropletAutoPauseArgs.builder()
                    .enabled(true)
                    .idleTimeout("5m")
                    .build())
                .autoResume(true)
                .environment(Map.of("LOG_LEVEL", "info"))
                .tags(            
                    "web",
                    "prod")
                .build());
    
        }
    }
    
    resources:
      example:
        type: digitalocean:Microdroplet
        properties:
          name: example-microdroplet
          region: nyc3
          size: microdroplet-1
          image: docker.io/library/nginx:latest
          httpPort: 8080
          httpProtocol: http
          autoPause:
            enabled: true
            idleTimeout: 5m
          autoResume: true
          environment:
            LOG_LEVEL: info
          tags:
            - web
            - prod
    
    pulumi {
      required_providers {
        digitalocean = {
          source = "pulumi/digitalocean"
        }
      }
    }
    
    resource "digitalocean_microdroplet" "example" {
      name          = "example-microdroplet"
      region        = "nyc3"
      size          = "microdroplet-1"
      image         = "docker.io/library/nginx:latest"
      http_port     = 8080
      http_protocol = "http"
      auto_pause = {
        enabled      = true
        idle_timeout = "5m"
      }
      auto_resume = true
      environment = {
        "LOG_LEVEL" = "info"
      }
      tags = ["web", "prod"]
    }
    

    Pausing and resuming

    The state attribute is settable and defaults to running. Changing it to paused calls the MicroDroplet pause action endpoint; changing it back to running calls the resume action endpoint. Neither triggers recreation:

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const example = new digitalocean.Microdroplet("example", {state: "paused"});
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    example = digitalocean.Microdroplet("example", state="paused")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := digitalocean.NewMicrodroplet(ctx, "example", &digitalocean.MicrodropletArgs{
    			State: pulumi.String("paused"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new DigitalOcean.Microdroplet("example", new()
        {
            State = "paused",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.Microdroplet;
    import com.pulumi.digitalocean.MicrodropletArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new Microdroplet("example", MicrodropletArgs.builder()
                .state("paused")
                .build());
    
        }
    }
    
    resources:
      example:
        type: digitalocean:Microdroplet
        properties:
          state: paused
    
    pulumi {
      required_providers {
        digitalocean = {
          source = "pulumi/digitalocean"
        }
      }
    }
    
    resource "digitalocean_microdroplet" "example" {
      state = "paused"
    }
    

    Setting state = "running" on a paused MicroDroplet resumes it. When autoPause is enabled, the platform may transition the MicroDroplet to paused on its own — Terraform suppresses the diff in that case so it does not fight the platform.

    Create Microdroplet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Microdroplet(name: string, args: MicrodropletArgs, opts?: CustomResourceOptions);
    @overload
    def Microdroplet(resource_name: str,
                     args: MicrodropletArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Microdroplet(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     image: Optional[str] = None,
                     size: Optional[str] = None,
                     region: Optional[str] = None,
                     http_port: Optional[int] = None,
                     http_protocol: Optional[str] = None,
                     auto_pause: Optional[MicrodropletAutoPauseArgs] = None,
                     name: Optional[str] = None,
                     networking: Optional[str] = None,
                     environment: Optional[Mapping[str, str]] = None,
                     auto_resume: Optional[bool] = None,
                     state: Optional[str] = None,
                     tags: Optional[Sequence[str]] = None,
                     vpc_uuid: Optional[str] = None)
    func NewMicrodroplet(ctx *Context, name string, args MicrodropletArgs, opts ...ResourceOption) (*Microdroplet, error)
    public Microdroplet(string name, MicrodropletArgs args, CustomResourceOptions? opts = null)
    public Microdroplet(String name, MicrodropletArgs args)
    public Microdroplet(String name, MicrodropletArgs args, CustomResourceOptions options)
    
    type: digitalocean:Microdroplet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "digitalocean_microdroplet" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args MicrodropletArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MicrodropletArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MicrodropletArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MicrodropletArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MicrodropletArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var microdropletResource = new DigitalOcean.Microdroplet("microdropletResource", new()
    {
        Image = "string",
        Size = "string",
        Region = "string",
        HttpPort = 0,
        HttpProtocol = "string",
        AutoPause = new DigitalOcean.Inputs.MicrodropletAutoPauseArgs
        {
            Enabled = false,
            IdleTimeout = "string",
        },
        Name = "string",
        Networking = "string",
        Environment = 
        {
            { "string", "string" },
        },
        AutoResume = false,
        State = "string",
        Tags = new[]
        {
            "string",
        },
        VpcUuid = "string",
    });
    
    example, err := digitalocean.NewMicrodroplet(ctx, "microdropletResource", &digitalocean.MicrodropletArgs{
    	Image:        pulumi.String("string"),
    	Size:         pulumi.String("string"),
    	Region:       pulumi.String("string"),
    	HttpPort:     pulumi.Int(0),
    	HttpProtocol: pulumi.String("string"),
    	AutoPause: &digitalocean.MicrodropletAutoPauseArgs{
    		Enabled:     pulumi.Bool(false),
    		IdleTimeout: pulumi.String("string"),
    	},
    	Name:       pulumi.String("string"),
    	Networking: pulumi.String("string"),
    	Environment: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	AutoResume: pulumi.Bool(false),
    	State:      pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	VpcUuid: pulumi.String("string"),
    })
    
    resource "digitalocean_microdroplet" "microdropletResource" {
      lifecycle {
        create_before_destroy = true
      }
      image         = "string"
      size          = "string"
      region        = "string"
      http_port     = 0
      http_protocol = "string"
      auto_pause = {
        enabled      = false
        idle_timeout = "string"
      }
      name       = "string"
      networking = "string"
      environment = {
        "string" = "string"
      }
      auto_resume = false
      state       = "string"
      tags        = ["string"]
      vpc_uuid    = "string"
    }
    
    var microdropletResource = new Microdroplet("microdropletResource", MicrodropletArgs.builder()
        .image("string")
        .size("string")
        .region("string")
        .httpPort(0)
        .httpProtocol("string")
        .autoPause(MicrodropletAutoPauseArgs.builder()
            .enabled(false)
            .idleTimeout("string")
            .build())
        .name("string")
        .networking("string")
        .environment(Map.of("string", "string"))
        .autoResume(false)
        .state("string")
        .tags("string")
        .vpcUuid("string")
        .build());
    
    microdroplet_resource = digitalocean.Microdroplet("microdropletResource",
        image="string",
        size="string",
        region="string",
        http_port=0,
        http_protocol="string",
        auto_pause={
            "enabled": False,
            "idle_timeout": "string",
        },
        name="string",
        networking="string",
        environment={
            "string": "string",
        },
        auto_resume=False,
        state="string",
        tags=["string"],
        vpc_uuid="string")
    
    const microdropletResource = new digitalocean.Microdroplet("microdropletResource", {
        image: "string",
        size: "string",
        region: "string",
        httpPort: 0,
        httpProtocol: "string",
        autoPause: {
            enabled: false,
            idleTimeout: "string",
        },
        name: "string",
        networking: "string",
        environment: {
            string: "string",
        },
        autoResume: false,
        state: "string",
        tags: ["string"],
        vpcUuid: "string",
    });
    
    type: digitalocean:Microdroplet
    properties:
        autoPause:
            enabled: false
            idleTimeout: string
        autoResume: false
        environment:
            string: string
        httpPort: 0
        httpProtocol: string
        image: string
        name: string
        networking: string
        region: string
        size: string
        state: string
        tags:
            - string
        vpcUuid: string
    

    Microdroplet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Microdroplet resource accepts the following input properties:

    Image string
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    Region string
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    Size string
    MicroDroplet size slug. Forces recreation on change.
    AutoPause Pulumi.DigitalOcean.Inputs.MicrodropletAutoPause
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    AutoResume bool
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    Environment Dictionary<string, string>
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    HttpPort int
    HTTP port to expose. Forces recreation on change.
    HttpProtocol string
    HTTP protocol: http or http2. Forces recreation on change.
    Name string
    Name of the MicroDroplet. Forces recreation on change.
    Networking string
    Networking mode: public (default) or vpc. Forces recreation on change.
    State string
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    Tags List<string>
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    VpcUuid string
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    Image string
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    Region string
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    Size string
    MicroDroplet size slug. Forces recreation on change.
    AutoPause MicrodropletAutoPauseArgs
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    AutoResume bool
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    Environment map[string]string
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    HttpPort int
    HTTP port to expose. Forces recreation on change.
    HttpProtocol string
    HTTP protocol: http or http2. Forces recreation on change.
    Name string
    Name of the MicroDroplet. Forces recreation on change.
    Networking string
    Networking mode: public (default) or vpc. Forces recreation on change.
    State string
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    Tags []string
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    VpcUuid string
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    image string
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    region string
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size string
    MicroDroplet size slug. Forces recreation on change.
    auto_pause object
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    auto_resume bool
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    environment map(string)
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    http_port number
    HTTP port to expose. Forces recreation on change.
    http_protocol string
    HTTP protocol: http or http2. Forces recreation on change.
    name string
    Name of the MicroDroplet. Forces recreation on change.
    networking string
    Networking mode: public (default) or vpc. Forces recreation on change.
    state string
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags list(string)
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpc_uuid string
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    image String
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    region String
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size String
    MicroDroplet size slug. Forces recreation on change.
    autoPause MicrodropletAutoPause
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    autoResume Boolean
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    environment Map<String,String>
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    httpPort Integer
    HTTP port to expose. Forces recreation on change.
    httpProtocol String
    HTTP protocol: http or http2. Forces recreation on change.
    name String
    Name of the MicroDroplet. Forces recreation on change.
    networking String
    Networking mode: public (default) or vpc. Forces recreation on change.
    state String
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags List<String>
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpcUuid String
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    image string
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    region string
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size string
    MicroDroplet size slug. Forces recreation on change.
    autoPause MicrodropletAutoPause
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    autoResume boolean
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    environment {[key: string]: string}
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    httpPort number
    HTTP port to expose. Forces recreation on change.
    httpProtocol string
    HTTP protocol: http or http2. Forces recreation on change.
    name string
    Name of the MicroDroplet. Forces recreation on change.
    networking string
    Networking mode: public (default) or vpc. Forces recreation on change.
    state string
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags string[]
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpcUuid string
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    image str
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    region str
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size str
    MicroDroplet size slug. Forces recreation on change.
    auto_pause MicrodropletAutoPauseArgs
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    auto_resume bool
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    environment Mapping[str, str]
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    http_port int
    HTTP port to expose. Forces recreation on change.
    http_protocol str
    HTTP protocol: http or http2. Forces recreation on change.
    name str
    Name of the MicroDroplet. Forces recreation on change.
    networking str
    Networking mode: public (default) or vpc. Forces recreation on change.
    state str
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags Sequence[str]
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpc_uuid str
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    image String
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    region String
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size String
    MicroDroplet size slug. Forces recreation on change.
    autoPause Property Map
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    autoResume Boolean
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    environment Map<String>
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    httpPort Number
    HTTP port to expose. Forces recreation on change.
    httpProtocol String
    HTTP protocol: http or http2. Forces recreation on change.
    name String
    Name of the MicroDroplet. Forces recreation on change.
    networking String
    Networking mode: public (default) or vpc. Forces recreation on change.
    state String
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags List<String>
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpcUuid String
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Microdroplet resource produces the following output properties:

    CreatedAt string
    RFC3339 timestamp of when the MicroDroplet was created.
    CurrentState string
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    DigitaloceanUrn string
    The uniform resource name (URN) for the MicroDroplet.
    Endpoint string
    Public endpoint URL for the MicroDroplet.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedAt string
    RFC3339 timestamp of when the MicroDroplet was created.
    CurrentState string
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    DigitaloceanUrn string
    The uniform resource name (URN) for the MicroDroplet.
    Endpoint string
    Public endpoint URL for the MicroDroplet.
    Id string
    The provider-assigned unique ID for this managed resource.
    created_at string
    RFC3339 timestamp of when the MicroDroplet was created.
    current_state string
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitalocean_urn string
    The uniform resource name (URN) for the MicroDroplet.
    endpoint string
    Public endpoint URL for the MicroDroplet.
    id string
    The provider-assigned unique ID for this managed resource.
    createdAt String
    RFC3339 timestamp of when the MicroDroplet was created.
    currentState String
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitaloceanUrn String
    The uniform resource name (URN) for the MicroDroplet.
    endpoint String
    Public endpoint URL for the MicroDroplet.
    id String
    The provider-assigned unique ID for this managed resource.
    createdAt string
    RFC3339 timestamp of when the MicroDroplet was created.
    currentState string
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitaloceanUrn string
    The uniform resource name (URN) for the MicroDroplet.
    endpoint string
    Public endpoint URL for the MicroDroplet.
    id string
    The provider-assigned unique ID for this managed resource.
    created_at str
    RFC3339 timestamp of when the MicroDroplet was created.
    current_state str
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitalocean_urn str
    The uniform resource name (URN) for the MicroDroplet.
    endpoint str
    Public endpoint URL for the MicroDroplet.
    id str
    The provider-assigned unique ID for this managed resource.
    createdAt String
    RFC3339 timestamp of when the MicroDroplet was created.
    currentState String
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitaloceanUrn String
    The uniform resource name (URN) for the MicroDroplet.
    endpoint String
    Public endpoint URL for the MicroDroplet.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Microdroplet Resource

    Get an existing Microdroplet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MicrodropletState, opts?: CustomResourceOptions): Microdroplet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_pause: Optional[MicrodropletAutoPauseArgs] = None,
            auto_resume: Optional[bool] = None,
            created_at: Optional[str] = None,
            current_state: Optional[str] = None,
            digitalocean_urn: Optional[str] = None,
            endpoint: Optional[str] = None,
            environment: Optional[Mapping[str, str]] = None,
            http_port: Optional[int] = None,
            http_protocol: Optional[str] = None,
            image: Optional[str] = None,
            name: Optional[str] = None,
            networking: Optional[str] = None,
            region: Optional[str] = None,
            size: Optional[str] = None,
            state: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            vpc_uuid: Optional[str] = None) -> Microdroplet
    func GetMicrodroplet(ctx *Context, name string, id IDInput, state *MicrodropletState, opts ...ResourceOption) (*Microdroplet, error)
    public static Microdroplet Get(string name, Input<string> id, MicrodropletState? state, CustomResourceOptions? opts = null)
    public static Microdroplet get(String name, Output<String> id, MicrodropletState state, CustomResourceOptions options)
    resources:  _:    type: digitalocean:Microdroplet    get:      id: ${id}
    import {
      to = digitalocean_microdroplet.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutoPause Pulumi.DigitalOcean.Inputs.MicrodropletAutoPause
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    AutoResume bool
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    CreatedAt string
    RFC3339 timestamp of when the MicroDroplet was created.
    CurrentState string
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    DigitaloceanUrn string
    The uniform resource name (URN) for the MicroDroplet.
    Endpoint string
    Public endpoint URL for the MicroDroplet.
    Environment Dictionary<string, string>
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    HttpPort int
    HTTP port to expose. Forces recreation on change.
    HttpProtocol string
    HTTP protocol: http or http2. Forces recreation on change.
    Image string
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    Name string
    Name of the MicroDroplet. Forces recreation on change.
    Networking string
    Networking mode: public (default) or vpc. Forces recreation on change.
    Region string
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    Size string
    MicroDroplet size slug. Forces recreation on change.
    State string
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    Tags List<string>
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    VpcUuid string
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    AutoPause MicrodropletAutoPauseArgs
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    AutoResume bool
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    CreatedAt string
    RFC3339 timestamp of when the MicroDroplet was created.
    CurrentState string
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    DigitaloceanUrn string
    The uniform resource name (URN) for the MicroDroplet.
    Endpoint string
    Public endpoint URL for the MicroDroplet.
    Environment map[string]string
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    HttpPort int
    HTTP port to expose. Forces recreation on change.
    HttpProtocol string
    HTTP protocol: http or http2. Forces recreation on change.
    Image string
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    Name string
    Name of the MicroDroplet. Forces recreation on change.
    Networking string
    Networking mode: public (default) or vpc. Forces recreation on change.
    Region string
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    Size string
    MicroDroplet size slug. Forces recreation on change.
    State string
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    Tags []string
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    VpcUuid string
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    auto_pause object
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    auto_resume bool
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    created_at string
    RFC3339 timestamp of when the MicroDroplet was created.
    current_state string
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitalocean_urn string
    The uniform resource name (URN) for the MicroDroplet.
    endpoint string
    Public endpoint URL for the MicroDroplet.
    environment map(string)
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    http_port number
    HTTP port to expose. Forces recreation on change.
    http_protocol string
    HTTP protocol: http or http2. Forces recreation on change.
    image string
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    name string
    Name of the MicroDroplet. Forces recreation on change.
    networking string
    Networking mode: public (default) or vpc. Forces recreation on change.
    region string
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size string
    MicroDroplet size slug. Forces recreation on change.
    state string
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags list(string)
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpc_uuid string
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    autoPause MicrodropletAutoPause
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    autoResume Boolean
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    createdAt String
    RFC3339 timestamp of when the MicroDroplet was created.
    currentState String
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitaloceanUrn String
    The uniform resource name (URN) for the MicroDroplet.
    endpoint String
    Public endpoint URL for the MicroDroplet.
    environment Map<String,String>
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    httpPort Integer
    HTTP port to expose. Forces recreation on change.
    httpProtocol String
    HTTP protocol: http or http2. Forces recreation on change.
    image String
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    name String
    Name of the MicroDroplet. Forces recreation on change.
    networking String
    Networking mode: public (default) or vpc. Forces recreation on change.
    region String
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size String
    MicroDroplet size slug. Forces recreation on change.
    state String
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags List<String>
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpcUuid String
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    autoPause MicrodropletAutoPause
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    autoResume boolean
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    createdAt string
    RFC3339 timestamp of when the MicroDroplet was created.
    currentState string
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitaloceanUrn string
    The uniform resource name (URN) for the MicroDroplet.
    endpoint string
    Public endpoint URL for the MicroDroplet.
    environment {[key: string]: string}
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    httpPort number
    HTTP port to expose. Forces recreation on change.
    httpProtocol string
    HTTP protocol: http or http2. Forces recreation on change.
    image string
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    name string
    Name of the MicroDroplet. Forces recreation on change.
    networking string
    Networking mode: public (default) or vpc. Forces recreation on change.
    region string
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size string
    MicroDroplet size slug. Forces recreation on change.
    state string
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags string[]
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpcUuid string
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    auto_pause MicrodropletAutoPauseArgs
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    auto_resume bool
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    created_at str
    RFC3339 timestamp of when the MicroDroplet was created.
    current_state str
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitalocean_urn str
    The uniform resource name (URN) for the MicroDroplet.
    endpoint str
    Public endpoint URL for the MicroDroplet.
    environment Mapping[str, str]
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    http_port int
    HTTP port to expose. Forces recreation on change.
    http_protocol str
    HTTP protocol: http or http2. Forces recreation on change.
    image str
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    name str
    Name of the MicroDroplet. Forces recreation on change.
    networking str
    Networking mode: public (default) or vpc. Forces recreation on change.
    region str
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size str
    MicroDroplet size slug. Forces recreation on change.
    state str
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags Sequence[str]
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpc_uuid str
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.
    autoPause Property Map
    Auto-pause configuration block. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_pause.
    autoResume Boolean
    Whether the MicroDroplet auto-resumes when it receives a request. Forces recreation on change: the MicroDroplets API has no in-place update path for auto_resume.
    createdAt String
    RFC3339 timestamp of when the MicroDroplet was created.
    currentState String
    Observed lifecycle state of the MicroDroplet (may differ transiently from state while a transition is in progress).
    digitaloceanUrn String
    The uniform resource name (URN) for the MicroDroplet.
    endpoint String
    Public endpoint URL for the MicroDroplet.
    environment Map<String>
    Map of environment variables passed to the MicroDroplet at boot. Forces recreation on change.
    httpPort Number
    HTTP port to expose. Forces recreation on change.
    httpProtocol String
    HTTP protocol: http or http2. Forces recreation on change.
    image String
    MicroDroplet image reference (UUID or URN). Forces recreation on change.
    name String
    Name of the MicroDroplet. Forces recreation on change.
    networking String
    Networking mode: public (default) or vpc. Forces recreation on change.
    region String
    DigitalOcean region slug for the MicroDroplet's location. Forces recreation on change.
    size String
    MicroDroplet size slug. Forces recreation on change.
    state String
    Desired lifecycle state. One of running (default) or paused. Changes are applied by invoking the pause / resume action endpoints and do not recreate the resource. This is the only attribute the provider can mutate in place.
    tags List<String>
    Set of tags applied to the MicroDroplet at create time. Forces recreation on change: MicroDroplets are not exposed via the shared /v2/tags API, so tags cannot be added, removed, or verified after creation. They also do not populate on pulumi import or on digitalocean.Microdroplet / digitalocean.getMicrodroplets data sources.
    vpcUuid String
    UUID of a VPC to attach to. Only valid when networking = "vpc". Forces recreation on change.

    Supporting Types

    MicrodropletAutoPause, MicrodropletAutoPauseArgs

    Enabled bool
    Whether auto-pause is enabled.
    IdleTimeout string
    Idle timeout as a Go duration string (e.g. 5m, 30s).
    Enabled bool
    Whether auto-pause is enabled.
    IdleTimeout string
    Idle timeout as a Go duration string (e.g. 5m, 30s).
    enabled bool
    Whether auto-pause is enabled.
    idle_timeout string
    Idle timeout as a Go duration string (e.g. 5m, 30s).
    enabled Boolean
    Whether auto-pause is enabled.
    idleTimeout String
    Idle timeout as a Go duration string (e.g. 5m, 30s).
    enabled boolean
    Whether auto-pause is enabled.
    idleTimeout string
    Idle timeout as a Go duration string (e.g. 5m, 30s).
    enabled bool
    Whether auto-pause is enabled.
    idle_timeout str
    Idle timeout as a Go duration string (e.g. 5m, 30s).
    enabled Boolean
    Whether auto-pause is enabled.
    idleTimeout String
    Idle timeout as a Go duration string (e.g. 5m, 30s).

    Import

    A MicroDroplet can be imported using its id, e.g.

    $ pulumi import digitalocean:index/microdroplet:Microdroplet example 506f78a4-e098-11e5-ad9f-000f53306ae1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    Viewing docs for DigitalOcean v4.77.0
    published on Friday, Jul 31, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial