published on Friday, Jul 31, 2026 by Pulumi
published on Friday, Jul 31, 2026 by Pulumi
Provides a DigitalOcean MicroDroplet image resource. Images are OCI references imported into DigitalOcean and consumed by digitalocean.Microdroplet resources.
Both name and source are immutable — changing either recreates the image. There is no in-place update; images are create-only and delete-only.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example = new digitalocean.MicrodropletImage("example", {
name: "my-app-v1",
source: "docker.io/myorg/my-app:v1",
});
const exampleMicrodroplet = new digitalocean.Microdroplet("example", {
name: "my-app",
region: "nyc3",
size: "microdroplet-1",
image: example.id,
});
import pulumi
import pulumi_digitalocean as digitalocean
example = digitalocean.MicrodropletImage("example",
name="my-app-v1",
source="docker.io/myorg/my-app:v1")
example_microdroplet = digitalocean.Microdroplet("example",
name="my-app",
region="nyc3",
size="microdroplet-1",
image=example.id)
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 {
example, err := digitalocean.NewMicrodropletImage(ctx, "example", &digitalocean.MicrodropletImageArgs{
Name: pulumi.String("my-app-v1"),
Source: pulumi.String("docker.io/myorg/my-app:v1"),
})
if err != nil {
return err
}
_, err = digitalocean.NewMicrodroplet(ctx, "example", &digitalocean.MicrodropletArgs{
Name: pulumi.String("my-app"),
Region: pulumi.String("nyc3"),
Size: pulumi.String("microdroplet-1"),
Image: example.ID(),
})
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.MicrodropletImage("example", new()
{
Name = "my-app-v1",
Source = "docker.io/myorg/my-app:v1",
});
var exampleMicrodroplet = new DigitalOcean.Microdroplet("example", new()
{
Name = "my-app",
Region = "nyc3",
Size = "microdroplet-1",
Image = example.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.MicrodropletImage;
import com.pulumi.digitalocean.MicrodropletImageArgs;
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 MicrodropletImage("example", MicrodropletImageArgs.builder()
.name("my-app-v1")
.source("docker.io/myorg/my-app:v1")
.build());
var exampleMicrodroplet = new Microdroplet("exampleMicrodroplet", MicrodropletArgs.builder()
.name("my-app")
.region("nyc3")
.size("microdroplet-1")
.image(example.id())
.build());
}
}
resources:
example:
type: digitalocean:MicrodropletImage
properties:
name: my-app-v1
source: docker.io/myorg/my-app:v1
exampleMicrodroplet:
type: digitalocean:Microdroplet
name: example
properties:
name: my-app
region: nyc3
size: microdroplet-1
image: ${example.id}
pulumi {
required_providers {
digitalocean = {
source = "pulumi/digitalocean"
}
}
}
resource "digitalocean_microdropletimage" "example" {
name = "my-app-v1"
source = "docker.io/myorg/my-app:v1"
}
resource "digitalocean_microdroplet" "example" {
name = "my-app"
region = "nyc3"
size = "microdroplet-1"
image = digitalocean_microdropletimage.example.id
}
Create MicrodropletImage Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MicrodropletImage(name: string, args: MicrodropletImageArgs, opts?: CustomResourceOptions);@overload
def MicrodropletImage(resource_name: str,
args: MicrodropletImageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MicrodropletImage(resource_name: str,
opts: Optional[ResourceOptions] = None,
source: Optional[str] = None,
name: Optional[str] = None)func NewMicrodropletImage(ctx *Context, name string, args MicrodropletImageArgs, opts ...ResourceOption) (*MicrodropletImage, error)public MicrodropletImage(string name, MicrodropletImageArgs args, CustomResourceOptions? opts = null)
public MicrodropletImage(String name, MicrodropletImageArgs args)
public MicrodropletImage(String name, MicrodropletImageArgs args, CustomResourceOptions options)
type: digitalocean:MicrodropletImage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "digitalocean_microdroplet_image" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args MicrodropletImageArgs
- 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 MicrodropletImageArgs
- 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 MicrodropletImageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MicrodropletImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MicrodropletImageArgs
- 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 microdropletImageResource = new DigitalOcean.MicrodropletImage("microdropletImageResource", new()
{
Source = "string",
Name = "string",
});
example, err := digitalocean.NewMicrodropletImage(ctx, "microdropletImageResource", &digitalocean.MicrodropletImageArgs{
Source: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "digitalocean_microdroplet_image" "microdropletImageResource" {
lifecycle {
create_before_destroy = true
}
source = "string"
name = "string"
}
var microdropletImageResource = new MicrodropletImage("microdropletImageResource", MicrodropletImageArgs.builder()
.source("string")
.name("string")
.build());
microdroplet_image_resource = digitalocean.MicrodropletImage("microdropletImageResource",
source="string",
name="string")
const microdropletImageResource = new digitalocean.MicrodropletImage("microdropletImageResource", {
source: "string",
name: "string",
});
type: digitalocean:MicrodropletImage
properties:
name: string
source: string
MicrodropletImage 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 MicrodropletImage resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the MicrodropletImage resource produces the following output properties:
- Created
At string - RFC3339 timestamp of when the image was created.
- Digitalocean
Urn string - The uniform resource name (URN) for the MicroDroplet image.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- Created
At string - RFC3339 timestamp of when the image was created.
- Digitalocean
Urn string - The uniform resource name (URN) for the MicroDroplet image.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created_
at string - RFC3339 timestamp of when the image was created.
- digitalocean_
urn string - The uniform resource name (URN) for the MicroDroplet image.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created
At String - RFC3339 timestamp of when the image was created.
- digitalocean
Urn String - The uniform resource name (URN) for the MicroDroplet image.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created
At string - RFC3339 timestamp of when the image was created.
- digitalocean
Urn string - The uniform resource name (URN) for the MicroDroplet image.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created_
at str - RFC3339 timestamp of when the image was created.
- digitalocean_
urn str - The uniform resource name (URN) for the MicroDroplet image.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created
At String - RFC3339 timestamp of when the image was created.
- digitalocean
Urn String - The uniform resource name (URN) for the MicroDroplet image.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
Look up Existing MicrodropletImage Resource
Get an existing MicrodropletImage 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?: MicrodropletImageState, opts?: CustomResourceOptions): MicrodropletImage@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
digitalocean_urn: Optional[str] = None,
name: Optional[str] = None,
source: Optional[str] = None,
status: Optional[str] = None) -> MicrodropletImagefunc GetMicrodropletImage(ctx *Context, name string, id IDInput, state *MicrodropletImageState, opts ...ResourceOption) (*MicrodropletImage, error)public static MicrodropletImage Get(string name, Input<string> id, MicrodropletImageState? state, CustomResourceOptions? opts = null)public static MicrodropletImage get(String name, Output<String> id, MicrodropletImageState state, CustomResourceOptions options)resources: _: type: digitalocean:MicrodropletImage get: id: ${id}import {
to = digitalocean_microdroplet_image.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.
- Created
At string - RFC3339 timestamp of when the image was created.
- Digitalocean
Urn string - The uniform resource name (URN) for the MicroDroplet image.
- Name string
- Name of the MicroDroplet image. Forces recreation on change.
- Source string
- OCI reference to import (e.g.
docker.io/library/nginx:latestor a DOCR ref). Forces recreation on change. - Status string
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- Created
At string - RFC3339 timestamp of when the image was created.
- Digitalocean
Urn string - The uniform resource name (URN) for the MicroDroplet image.
- Name string
- Name of the MicroDroplet image. Forces recreation on change.
- Source string
- OCI reference to import (e.g.
docker.io/library/nginx:latestor a DOCR ref). Forces recreation on change. - Status string
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created_
at string - RFC3339 timestamp of when the image was created.
- digitalocean_
urn string - The uniform resource name (URN) for the MicroDroplet image.
- name string
- Name of the MicroDroplet image. Forces recreation on change.
- source string
- OCI reference to import (e.g.
docker.io/library/nginx:latestor a DOCR ref). Forces recreation on change. - status string
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created
At String - RFC3339 timestamp of when the image was created.
- digitalocean
Urn String - The uniform resource name (URN) for the MicroDroplet image.
- name String
- Name of the MicroDroplet image. Forces recreation on change.
- source String
- OCI reference to import (e.g.
docker.io/library/nginx:latestor a DOCR ref). Forces recreation on change. - status String
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created
At string - RFC3339 timestamp of when the image was created.
- digitalocean
Urn string - The uniform resource name (URN) for the MicroDroplet image.
- name string
- Name of the MicroDroplet image. Forces recreation on change.
- source string
- OCI reference to import (e.g.
docker.io/library/nginx:latestor a DOCR ref). Forces recreation on change. - status string
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created_
at str - RFC3339 timestamp of when the image was created.
- digitalocean_
urn str - The uniform resource name (URN) for the MicroDroplet image.
- name str
- Name of the MicroDroplet image. Forces recreation on change.
- source str
- OCI reference to import (e.g.
docker.io/library/nginx:latestor a DOCR ref). Forces recreation on change. - status str
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
- created
At String - RFC3339 timestamp of when the image was created.
- digitalocean
Urn String - The uniform resource name (URN) for the MicroDroplet image.
- name String
- Name of the MicroDroplet image. Forces recreation on change.
- source String
- OCI reference to import (e.g.
docker.io/library/nginx:latestor a DOCR ref). Forces recreation on change. - status String
- Lifecycle status (
IMAGE_AVAILABLEonce import completes).
Import
A MicroDroplet image can be imported using its id, e.g.
$ pulumi import digitalocean:index/microdropletImage:MicrodropletImage example 4a2c9f10-3d18-4b6a-9e3d-2b7f8e0f1c11
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
digitaloceanTerraform Provider.
published on Friday, Jul 31, 2026 by Pulumi