published on Saturday, Nov 7, 2026 by Pulumi
published on Saturday, Nov 7, 2026 by Pulumi
Provides an additional ingress URL for a digitalocean.Microvm.
Ingress URLs are minted by the platform, so the configuration cannot declare a
hostname; it only chooses the guest port. Adding this resource adds a URL to
the MicroVM in place, and removing it removes the URL. Neither operation
replaces the MicroVM.
Use the ingressEnabled argument on digitalocean.Microvm to control the
default URL. Use this resource for any URL beyond the default.
Note: MicroVMs are in public preview.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const web = new digitalocean.Microvm("web", {
name: "example-microvm",
region: "nyc3",
httpPort: 8080,
ports: [
8080,
9090,
],
size: {
cpu: 2,
memory: 4096,
},
source: {
ociRef: "docker.io/library/nginx:latest",
},
});
// An extra URL that routes to port 9090.
const admin = new digitalocean.MicrovmIngress("admin", {
microvmId: web.id,
port: 9090,
});
export const adminUrl = admin.hostname;
import pulumi
import pulumi_digitalocean as digitalocean
web = digitalocean.Microvm("web",
name="example-microvm",
region="nyc3",
http_port=8080,
ports=[
8080,
9090,
],
size={
"cpu": 2,
"memory": 4096,
},
source={
"oci_ref": "docker.io/library/nginx:latest",
})
# An extra URL that routes to port 9090.
admin = digitalocean.MicrovmIngress("admin",
microvm_id=web.id,
port=9090)
pulumi.export("adminUrl", admin.hostname)
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 {
web, err := digitalocean.NewMicrovm(ctx, "web", &digitalocean.MicrovmArgs{
Name: pulumi.String("example-microvm"),
Region: pulumi.String("nyc3"),
HttpPort: pulumi.Int(8080),
Ports: pulumi.IntArray{
pulumi.Int(8080),
pulumi.Int(9090),
},
Size: &digitalocean.MicrovmSizeArgs{
Cpu: pulumi.Int(2),
Memory: pulumi.Int(4096),
},
Source: &digitalocean.MicrovmSourceArgs{
OciRef: pulumi.String("docker.io/library/nginx:latest"),
},
})
if err != nil {
return err
}
// An extra URL that routes to port 9090.
admin, err := digitalocean.NewMicrovmIngress(ctx, "admin", &digitalocean.MicrovmIngressArgs{
MicrovmId: web.ID(),
Port: pulumi.Int(9090),
})
if err != nil {
return err
}
ctx.Export("adminUrl", admin.Hostname)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var web = new DigitalOcean.Microvm("web", new()
{
Name = "example-microvm",
Region = "nyc3",
HttpPort = 8080,
Ports = new[]
{
8080,
9090,
},
Size = new DigitalOcean.Inputs.MicrovmSizeArgs
{
Cpu = 2,
Memory = 4096,
},
Source = new DigitalOcean.Inputs.MicrovmSourceArgs
{
OciRef = "docker.io/library/nginx:latest",
},
});
// An extra URL that routes to port 9090.
var admin = new DigitalOcean.MicrovmIngress("admin", new()
{
MicrovmId = web.Id,
Port = 9090,
});
return new Dictionary<string, object?>
{
["adminUrl"] = admin.Hostname,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Microvm;
import com.pulumi.digitalocean.MicrovmArgs;
import com.pulumi.digitalocean.inputs.MicrovmSizeArgs;
import com.pulumi.digitalocean.inputs.MicrovmSourceArgs;
import com.pulumi.digitalocean.MicrovmIngress;
import com.pulumi.digitalocean.MicrovmIngressArgs;
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 web = new Microvm("web", MicrovmArgs.builder()
.name("example-microvm")
.region("nyc3")
.httpPort(8080)
.ports(
8080,
9090)
.size(MicrovmSizeArgs.builder()
.cpu(2)
.memory(4096)
.build())
.source(MicrovmSourceArgs.builder()
.ociRef("docker.io/library/nginx:latest")
.build())
.build());
// An extra URL that routes to port 9090.
var admin = new MicrovmIngress("admin", MicrovmIngressArgs.builder()
.microvmId(web.id())
.port(9090)
.build());
ctx.export("adminUrl", admin.hostname());
}
}
resources:
web:
type: digitalocean:Microvm
properties:
name: example-microvm
region: nyc3
httpPort: 8080
ports:
- 8080
- 9090
size:
cpu: 2
memory: 4096
source:
ociRef: docker.io/library/nginx:latest
# An extra URL that routes to port 9090.
admin:
type: digitalocean:MicrovmIngress
properties:
microvmId: ${web.id}
port: 9090
outputs:
adminUrl: ${admin.hostname}
terraform {
required_providers {
digitalocean = {
source = "pulumi/digitalocean"
}
}
}
resource "digitalocean_microvm" "web" {
lifecycle {
create_before_destroy = true
}
name = "example-microvm"
region = "nyc3"
http_port = 8080
ports = [8080, 9090]
size {
cpu = 2
memory = 4096
}
source {
oci_ref = "docker.io/library/nginx:latest"
}
}
# An extra URL that routes to port 9090.
resource "digitalocean_microvm_ingress" "admin" {
lifecycle {
create_before_destroy = true
}
microvm_id = digitalocean_microvm.web.id
port = 9090
}
output "adminUrl" {
value = digitalocean_microvm_ingress.admin.hostname
}
MicroVM without a default URL
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const api = new digitalocean.Microvm("api", {
name: "example-api",
region: "nyc3",
ingressEnabled: false,
size: {
cpu: 2,
memory: 4096,
},
source: {
ociRef: "docker.io/library/nginx:latest",
},
});
const apiMicrovmIngress = new digitalocean.MicrovmIngress("api", {microvmId: api.id});
import pulumi
import pulumi_digitalocean as digitalocean
api = digitalocean.Microvm("api",
name="example-api",
region="nyc3",
ingress_enabled=False,
size={
"cpu": 2,
"memory": 4096,
},
source={
"oci_ref": "docker.io/library/nginx:latest",
})
api_microvm_ingress = digitalocean.MicrovmIngress("api", microvm_id=api.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 {
api, err := digitalocean.NewMicrovm(ctx, "api", &digitalocean.MicrovmArgs{
Name: pulumi.String("example-api"),
Region: pulumi.String("nyc3"),
IngressEnabled: pulumi.Bool(false),
Size: &digitalocean.MicrovmSizeArgs{
Cpu: pulumi.Int(2),
Memory: pulumi.Int(4096),
},
Source: &digitalocean.MicrovmSourceArgs{
OciRef: pulumi.String("docker.io/library/nginx:latest"),
},
})
if err != nil {
return err
}
_, err = digitalocean.NewMicrovmIngress(ctx, "api", &digitalocean.MicrovmIngressArgs{
MicrovmId: api.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 api = new DigitalOcean.Microvm("api", new()
{
Name = "example-api",
Region = "nyc3",
IngressEnabled = false,
Size = new DigitalOcean.Inputs.MicrovmSizeArgs
{
Cpu = 2,
Memory = 4096,
},
Source = new DigitalOcean.Inputs.MicrovmSourceArgs
{
OciRef = "docker.io/library/nginx:latest",
},
});
var apiMicrovmIngress = new DigitalOcean.MicrovmIngress("api", new()
{
MicrovmId = api.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Microvm;
import com.pulumi.digitalocean.MicrovmArgs;
import com.pulumi.digitalocean.inputs.MicrovmSizeArgs;
import com.pulumi.digitalocean.inputs.MicrovmSourceArgs;
import com.pulumi.digitalocean.MicrovmIngress;
import com.pulumi.digitalocean.MicrovmIngressArgs;
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 api = new Microvm("api", MicrovmArgs.builder()
.name("example-api")
.region("nyc3")
.ingressEnabled(false)
.size(MicrovmSizeArgs.builder()
.cpu(2)
.memory(4096)
.build())
.source(MicrovmSourceArgs.builder()
.ociRef("docker.io/library/nginx:latest")
.build())
.build());
var apiMicrovmIngress = new MicrovmIngress("apiMicrovmIngress", MicrovmIngressArgs.builder()
.microvmId(api.id())
.build());
}
}
resources:
api:
type: digitalocean:Microvm
properties:
name: example-api
region: nyc3
ingressEnabled: false
size:
cpu: 2
memory: 4096
source:
ociRef: docker.io/library/nginx:latest
apiMicrovmIngress:
type: digitalocean:MicrovmIngress
name: api
properties:
microvmId: ${api.id}
terraform {
required_providers {
digitalocean = {
source = "pulumi/digitalocean"
}
}
}
resource "digitalocean_microvm" "api" {
lifecycle {
create_before_destroy = true
}
name = "example-api"
region = "nyc3"
ingress_enabled = false
size {
cpu = 2
memory = 4096
}
source {
oci_ref = "docker.io/library/nginx:latest"
}
}
resource "digitalocean_microvm_ingress" "api" {
lifecycle {
create_before_destroy = true
}
microvm_id = digitalocean_microvm.api.id
}
Create MicrovmIngress Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MicrovmIngress(name: string, args: MicrovmIngressArgs, opts?: CustomResourceOptions);@overload
def MicrovmIngress(resource_name: str,
args: MicrovmIngressArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MicrovmIngress(resource_name: str,
opts: Optional[ResourceOptions] = None,
microvm_id: Optional[str] = None,
port: Optional[int] = None)func NewMicrovmIngress(ctx *Context, name string, args MicrovmIngressArgs, opts ...ResourceOption) (*MicrovmIngress, error)public MicrovmIngress(string name, MicrovmIngressArgs args, CustomResourceOptions? opts = null)
public MicrovmIngress(String name, MicrovmIngressArgs args)
public MicrovmIngress(String name, MicrovmIngressArgs args, CustomResourceOptions options)
type: digitalocean:MicrovmIngress
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "digitalocean_microvm_ingress" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args MicrovmIngressArgs
- 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 MicrovmIngressArgs
- 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 MicrovmIngressArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MicrovmIngressArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MicrovmIngressArgs
- 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 microvmIngressResource = new DigitalOcean.MicrovmIngress("microvmIngressResource", new()
{
MicrovmId = "string",
Port = 0,
});
example, err := digitalocean.NewMicrovmIngress(ctx, "microvmIngressResource", &digitalocean.MicrovmIngressArgs{
MicrovmId: pulumi.String("string"),
Port: pulumi.Int(0),
})
resource "digitalocean_microvm_ingress" "microvmIngressResource" {
lifecycle {
create_before_destroy = true
}
microvm_id = "string"
port = 0
}
var microvmIngressResource = new MicrovmIngress("microvmIngressResource", MicrovmIngressArgs.builder()
.microvmId("string")
.port(0)
.build());
microvm_ingress_resource = digitalocean.MicrovmIngress("microvmIngressResource",
microvm_id="string",
port=0)
const microvmIngressResource = new digitalocean.MicrovmIngress("microvmIngressResource", {
microvmId: "string",
port: 0,
});
type: digitalocean:MicrovmIngress
properties:
microvmId: string
port: 0
MicrovmIngress 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 MicrovmIngress resource accepts the following input properties:
- microvm_
id string - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- port number
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL.
- microvm_
id str - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- port int
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL.
Outputs
All input properties are implicitly available as output properties. Additionally, the MicrovmIngress resource produces the following output properties:
Look up Existing MicrovmIngress Resource
Get an existing MicrovmIngress 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?: MicrovmIngressState, opts?: CustomResourceOptions): MicrovmIngress@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
default: Optional[bool] = None,
hostname: Optional[str] = None,
microvm_id: Optional[str] = None,
port: Optional[int] = None,
status: Optional[str] = None,
url_id: Optional[str] = None) -> MicrovmIngressfunc GetMicrovmIngress(ctx *Context, name string, id IDInput, state *MicrovmIngressState, opts ...ResourceOption) (*MicrovmIngress, error)public static MicrovmIngress Get(string name, Input<string> id, MicrovmIngressState? state, CustomResourceOptions? opts = null)public static MicrovmIngress get(String name, Output<String> id, MicrovmIngressState state, CustomResourceOptions options)resources: _: type: digitalocean:MicrovmIngress get: id: ${id}import {
to = digitalocean_microvm_ingress.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.
- Default bool
- Whether this is the MicroVM's system default URL.
- Hostname string
- The assigned hostname, without a scheme.
- Microvm
Id string - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- Port int
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL. - Status string
- The URL status:
PENDINGorACTIVE. - Url
Id string - The stable identifier of the URL (same as
id).
- Default bool
- Whether this is the MicroVM's system default URL.
- Hostname string
- The assigned hostname, without a scheme.
- Microvm
Id string - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- Port int
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL. - Status string
- The URL status:
PENDINGorACTIVE. - Url
Id string - The stable identifier of the URL (same as
id).
- default bool
- Whether this is the MicroVM's system default URL.
- hostname string
- The assigned hostname, without a scheme.
- microvm_
id string - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- port number
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL. - status string
- The URL status:
PENDINGorACTIVE. - url_
id string - The stable identifier of the URL (same as
id).
- default_ Boolean
- Whether this is the MicroVM's system default URL.
- hostname String
- The assigned hostname, without a scheme.
- microvm
Id String - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- port Integer
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL. - status String
- The URL status:
PENDINGorACTIVE. - url
Id String - The stable identifier of the URL (same as
id).
- default boolean
- Whether this is the MicroVM's system default URL.
- hostname string
- The assigned hostname, without a scheme.
- microvm
Id string - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- port number
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL. - status string
- The URL status:
PENDINGorACTIVE. - url
Id string - The stable identifier of the URL (same as
id).
- default bool
- Whether this is the MicroVM's system default URL.
- hostname str
- The assigned hostname, without a scheme.
- microvm_
id str - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- port int
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL. - status str
- The URL status:
PENDINGorACTIVE. - url_
id str - The stable identifier of the URL (same as
id).
- default Boolean
- Whether this is the MicroVM's system default URL.
- hostname String
- The assigned hostname, without a scheme.
- microvm
Id String - The ID of the MicroVM to add the URL to. Changing this forces a new URL.
- port Number
- The guest port the URL routes to. Must be one of the MicroVM's
ports. Defaults to the MicroVM'shttpPortwhen omitted. Changing this forces a new URL. - status String
- The URL status:
PENDINGorACTIVE. - url
Id String - The stable identifier of the URL (same as
id).
Import
A MicroVM ingress URL can be imported using the MicroVM ID and the URL ID, separated by a comma, e.g.
$ pulumi import digitalocean:index/microvmIngress:MicrovmIngress admin 506f78a4-e098-11e5-ad9f-000f53306ae1,b1c2d3e4-f5a6-7890-abcd-ef1234567890
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 Saturday, Nov 7, 2026 by Pulumi