This page documents the language specification for the digitalocean package. If you're looking for help working with the inputs, outputs, or functions of digitalocean resources in a Pulumi program, please see the resource documentation for examples and API reference.

Pulumi DigitalOcean

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-digitalocean repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-digitalocean repo.

class pulumi_digitalocean.AwaitableGetAccountResult(droplet_limit=None, email=None, email_verified=None, floating_ip_limit=None, id=None, status=None, status_message=None, uuid=None)
class pulumi_digitalocean.AwaitableGetCertificateResult(domains=None, id=None, name=None, not_after=None, sha1_fingerprint=None, state=None, type=None)
class pulumi_digitalocean.AwaitableGetContainerRegistryResult(endpoint=None, id=None, name=None, server_url=None)
class pulumi_digitalocean.AwaitableGetDatabaseClusterResult(database=None, engine=None, host=None, id=None, maintenance_windows=None, name=None, node_count=None, password=None, port=None, private_host=None, private_network_uuid=None, private_uri=None, region=None, size=None, tags=None, uri=None, urn=None, user=None, version=None)
class pulumi_digitalocean.AwaitableGetDomainResult(domain_urn=None, id=None, name=None, ttl=None, zone_file=None)
class pulumi_digitalocean.AwaitableGetDropletResult(backups=None, created_at=None, disk=None, id=None, image=None, ipv4_address=None, ipv4_address_private=None, ipv6=None, ipv6_address=None, ipv6_address_private=None, locked=None, memory=None, monitoring=None, name=None, price_hourly=None, price_monthly=None, private_networking=None, region=None, size=None, status=None, tag=None, tags=None, urn=None, vcpus=None, volume_ids=None, vpc_uuid=None)
class pulumi_digitalocean.AwaitableGetDropletSnapshotResult(created_at=None, droplet_id=None, id=None, min_disk_size=None, most_recent=None, name=None, name_regex=None, region=None, regions=None, size=None)
class pulumi_digitalocean.AwaitableGetDropletsResult(droplets=None, filters=None, id=None, sorts=None)
class pulumi_digitalocean.AwaitableGetFloatingIpResult(droplet_id=None, floating_ip_urn=None, id=None, ip_address=None, region=None)
class pulumi_digitalocean.AwaitableGetImageResult(created=None, distribution=None, error_message=None, id=None, image=None, min_disk_size=None, name=None, private=None, regions=None, size_gigabytes=None, slug=None, source=None, status=None, tags=None, type=None)
class pulumi_digitalocean.AwaitableGetImagesResult(filters=None, id=None, images=None, sorts=None)
class pulumi_digitalocean.AwaitableGetKubernetesClusterResult(cluster_subnet=None, created_at=None, endpoint=None, id=None, ipv4_address=None, kube_configs=None, name=None, node_pools=None, region=None, service_subnet=None, status=None, tags=None, updated_at=None, version=None, vpc_uuid=None)
class pulumi_digitalocean.AwaitableGetKubernetesVersionsResult(id=None, latest_version=None, valid_versions=None, version_prefix=None)
class pulumi_digitalocean.AwaitableGetLoadBalancerResult(algorithm=None, droplet_ids=None, droplet_tag=None, enable_backend_keepalive=None, enable_proxy_protocol=None, forwarding_rules=None, healthcheck=None, id=None, ip=None, load_balancer_urn=None, name=None, redirect_http_to_https=None, region=None, status=None, sticky_sessions=None, vpc_uuid=None)
class pulumi_digitalocean.AwaitableGetProjectResult(created_at=None, description=None, environment=None, id=None, is_default=None, name=None, owner_id=None, owner_uuid=None, purpose=None, resources=None, updated_at=None)
class pulumi_digitalocean.AwaitableGetProjectsResult(filters=None, id=None, projects=None, sorts=None)
class pulumi_digitalocean.AwaitableGetRecordResult(data=None, domain=None, flags=None, id=None, name=None, port=None, priority=None, tag=None, ttl=None, type=None, weight=None)
class pulumi_digitalocean.AwaitableGetRegionResult(available=None, features=None, id=None, name=None, sizes=None, slug=None)
class pulumi_digitalocean.AwaitableGetRegionsResult(filters=None, id=None, regions=None, sorts=None)
class pulumi_digitalocean.AwaitableGetSizesResult(filters=None, id=None, sizes=None, sorts=None)
class pulumi_digitalocean.AwaitableGetSpacesBucketObjectResult(body=None, bucket=None, cache_control=None, content_disposition=None, content_encoding=None, content_language=None, content_length=None, content_type=None, etag=None, expiration=None, expires=None, id=None, key=None, last_modified=None, metadata=None, range=None, region=None, version_id=None, website_redirect_location=None)
class pulumi_digitalocean.AwaitableGetSpacesBucketObjectsResult(bucket=None, common_prefixes=None, delimiter=None, encoding_type=None, id=None, keys=None, max_keys=None, owners=None, prefix=None, region=None)
class pulumi_digitalocean.AwaitableGetSpacesBucketResult(bucket_domain_name=None, id=None, name=None, region=None, urn=None)
class pulumi_digitalocean.AwaitableGetSpacesBucketsResult(buckets=None, filters=None, id=None, sorts=None)
class pulumi_digitalocean.AwaitableGetSshKeyResult(fingerprint=None, id=None, name=None, public_key=None)
class pulumi_digitalocean.AwaitableGetTagResult(databases_count=None, droplets_count=None, id=None, images_count=None, name=None, total_resource_count=None, volume_snapshots_count=None, volumes_count=None)
class pulumi_digitalocean.AwaitableGetTagsResult(filters=None, id=None, sorts=None, tags=None)
class pulumi_digitalocean.AwaitableGetVolumeResult(description=None, droplet_ids=None, filesystem_label=None, filesystem_type=None, id=None, name=None, region=None, size=None, tags=None, urn=None)
class pulumi_digitalocean.AwaitableGetVolumeSnapshotResult(created_at=None, id=None, min_disk_size=None, most_recent=None, name=None, name_regex=None, region=None, regions=None, size=None, tags=None, volume_id=None)
class pulumi_digitalocean.AwaitableGetVpcResult(created_at=None, default=None, description=None, id=None, ip_range=None, name=None, region=None, urn=None)
class pulumi_digitalocean.Cdn(resource_name, opts=None, certificate_id=None, custom_domain=None, origin=None, ttl=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean CDN Endpoint resource for use with Spaces.

import pulumi
import pulumi_digitalocean as digitalocean

# Create a new Spaces Bucket
mybucket = digitalocean.SpacesBucket("mybucket",
    region="sfo2",
    acl="public-read")
# Add a CDN endpoint to the Spaces Bucket
mycdn = digitalocean.Cdn("mycdn", origin=mybucket.bucket_domain_name)
pulumi.export("fqdn", mycdn.endpoint)
import pulumi
import pulumi_digitalocean as digitalocean

# Create a new Spaces Bucket
mybucket = digitalocean.SpacesBucket("mybucket",
    region="sfo2",
    acl="public-read")
# Create a DigitalOcean managed Let's Encrypt Certificate
cert = digitalocean.Certificate("cert",
    type="lets_encrypt",
    domains=["static.example.com"])
# Add a CDN endpoint with a custom sub-domain to the Spaces Bucket
mycdn = digitalocean.Cdn("mycdn",
    origin=mybucket.bucket_domain_name,
    custom_domain="static.example.com",
    certificate_id=cert.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • certificate_id (pulumi.Input[str]) – The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.

  • custom_domain (pulumi.Input[str]) – The fully qualified domain name (FQDN) of the custom subdomain used with the CDN Endpoint.

  • origin (pulumi.Input[str]) – The fully qualified domain name, (FQDN) for a Space.

  • ttl (pulumi.Input[float]) – The time to live for the CDN Endpoint, in seconds. Default is 3600 seconds.

certificate_id: pulumi.Output[str] = None

The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.

created_at: pulumi.Output[str] = None

The date and time when the CDN Endpoint was created.

custom_domain: pulumi.Output[str] = None

The fully qualified domain name (FQDN) of the custom subdomain used with the CDN Endpoint.

endpoint: pulumi.Output[str] = None

The fully qualified domain name (FQDN) from which the CDN-backed content is served.

origin: pulumi.Output[str] = None

The fully qualified domain name, (FQDN) for a Space.

ttl: pulumi.Output[float] = None

The time to live for the CDN Endpoint, in seconds. Default is 3600 seconds.

static get(resource_name, id, opts=None, certificate_id=None, created_at=None, custom_domain=None, endpoint=None, origin=None, ttl=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • certificate_id (pulumi.Input[str]) – The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided.

  • created_at (pulumi.Input[str]) – The date and time when the CDN Endpoint was created.

  • custom_domain (pulumi.Input[str]) – The fully qualified domain name (FQDN) of the custom subdomain used with the CDN Endpoint.

  • endpoint (pulumi.Input[str]) – The fully qualified domain name (FQDN) from which the CDN-backed content is served.

  • origin (pulumi.Input[str]) – The fully qualified domain name, (FQDN) for a Space.

  • ttl (pulumi.Input[float]) – The time to live for the CDN Endpoint, in seconds. Default is 3600 seconds.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Certificate(resource_name, opts=None, certificate_chain=None, domains=None, leaf_certificate=None, name=None, private_key=None, type=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Certificate resource that allows you to manage certificates for configuring TLS termination in Load Balancers. Certificates created with this resource can be referenced in your Load Balancer configuration via their ID. The certificate can either be a custom one provided by you or automatically generated one with Let’s Encrypt.

import pulumi
import pulumi_digitalocean as digitalocean

cert = digitalocean.Certificate("cert",
    type="custom",
    private_key=(lambda path: open(path).read())("/Users/myuser/certs/privkey.pem"),
    leaf_certificate=(lambda path: open(path).read())("/Users/myuser/certs/cert.pem"),
    certificate_chain=(lambda path: open(path).read())("/Users/myuser/certs/fullchain.pem"))
import pulumi
import pulumi_digitalocean as digitalocean

cert = digitalocean.Certificate("cert",
    domains=["example.com"],
    type="lets_encrypt")
import pulumi
import pulumi_digitalocean as digitalocean

cert = digitalocean.Certificate("cert",
    type="lets_encrypt",
    domains=["example.com"])
# Create a new Load Balancer with TLS termination
public = digitalocean.LoadBalancer("public",
    region="nyc3",
    droplet_tag="backend",
    forwarding_rule=[{
        "entryPort": 443,
        "entryProtocol": "https",
        "targetPort": 80,
        "targetProtocol": "http",
        "certificate_id": cert.id,
    }])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • certificate_chain (pulumi.Input[str]) – The full PEM-formatted trust chain between the certificate authority’s certificate and your domain’s TLS certificate. Only valid when type is custom.

  • domains (pulumi.Input[list]) – List of fully qualified domain names (FQDNs) for which the certificate will be issued. The domains must be managed using DigitalOcean’s DNS. Only valid when type is lets_encrypt.

  • leaf_certificate (pulumi.Input[str]) – The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.

  • name (pulumi.Input[str]) – The name of the certificate for identification.

  • private_key (pulumi.Input[str]) – The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.

  • type (pulumi.Input[str]) – The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.

certificate_chain: pulumi.Output[str] = None

The full PEM-formatted trust chain between the certificate authority’s certificate and your domain’s TLS certificate. Only valid when type is custom.

domains: pulumi.Output[list] = None

List of fully qualified domain names (FQDNs) for which the certificate will be issued. The domains must be managed using DigitalOcean’s DNS. Only valid when type is lets_encrypt.

leaf_certificate: pulumi.Output[str] = None

The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.

name: pulumi.Output[str] = None

The name of the certificate for identification.

not_after: pulumi.Output[str] = None

The expiration date of the certificate

private_key: pulumi.Output[str] = None

The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.

sha1_fingerprint: pulumi.Output[str] = None

The SHA-1 fingerprint of the certificate

type: pulumi.Output[str] = None

The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.

static get(resource_name, id, opts=None, certificate_chain=None, domains=None, leaf_certificate=None, name=None, not_after=None, private_key=None, sha1_fingerprint=None, state=None, type=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • certificate_chain (pulumi.Input[str]) – The full PEM-formatted trust chain between the certificate authority’s certificate and your domain’s TLS certificate. Only valid when type is custom.

  • domains (pulumi.Input[list]) – List of fully qualified domain names (FQDNs) for which the certificate will be issued. The domains must be managed using DigitalOcean’s DNS. Only valid when type is lets_encrypt.

  • leaf_certificate (pulumi.Input[str]) – The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.

  • name (pulumi.Input[str]) – The name of the certificate for identification.

  • not_after (pulumi.Input[str]) – The expiration date of the certificate

  • private_key (pulumi.Input[str]) – The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.

  • sha1_fingerprint (pulumi.Input[str]) – The SHA-1 fingerprint of the certificate

  • type (pulumi.Input[str]) – The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.ContainerRegistry(resource_name, opts=None, name=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Container Registry resource. A Container Registry is a secure, private location to store your containers for rapid deployment.

import pulumi
import pulumi_digitalocean as digitalocean

# Create a new container registry
foobar = digitalocean.ContainerRegistry("foobar")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the container_registry

name: pulumi.Output[str] = None

The name of the container_registry

static get(resource_name, id, opts=None, endpoint=None, name=None, server_url=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the container_registry

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.ContainerRegistryDockerCredentials(resource_name, opts=None, expiry_seconds=None, registry_name=None, write=None, __props__=None, __name__=None, __opts__=None)

Get Docker credentials for your DigitalOcean container registry.

An error is triggered if the provided container registry name does not exist.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.ContainerRegistryDockerCredentials("example", registry_name="example")
import pulumi
import pulumi_digitalocean as digitalocean

example_container_registry = digitalocean.get_container_registry(name="example")
example_container_registry_docker_credentials = digitalocean.ContainerRegistryDockerCredentials("exampleContainerRegistryDockerCredentials", registry_name="example")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • expiry_seconds (pulumi.Input[float]) – The amount of time to pass before the Docker credentials expire in seconds. Defaults to 2147483647, or roughly 68 years. Must be greater than 0 and less than 2147483647.

  • registry_name (pulumi.Input[str]) – The name of the container registry.

  • write (pulumi.Input[bool]) – Allow for write access to the container registry. Defaults to false.

expiry_seconds: pulumi.Output[float] = None

The amount of time to pass before the Docker credentials expire in seconds. Defaults to 2147483647, or roughly 68 years. Must be greater than 0 and less than 2147483647.

registry_name: pulumi.Output[str] = None

The name of the container registry.

write: pulumi.Output[bool] = None

Allow for write access to the container registry. Defaults to false.

static get(resource_name, id, opts=None, credential_expiration_time=None, docker_credentials=None, expiry_seconds=None, registry_name=None, write=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • expiry_seconds (pulumi.Input[float]) – The amount of time to pass before the Docker credentials expire in seconds. Defaults to 2147483647, or roughly 68 years. Must be greater than 0 and less than 2147483647.

  • registry_name (pulumi.Input[str]) – The name of the container registry.

  • write (pulumi.Input[bool]) – Allow for write access to the container registry. Defaults to false.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.DatabaseCluster(resource_name, opts=None, engine=None, eviction_policy=None, maintenance_windows=None, name=None, node_count=None, private_network_uuid=None, region=None, size=None, sql_mode=None, tags=None, version=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean database cluster resource.

import pulumi
import pulumi_digitalocean as digitalocean

postgres_example = digitalocean.DatabaseCluster("postgres-example",
    engine="pg",
    node_count=1,
    region="nyc1",
    size="db-s-1vcpu-1gb",
    version="11")
import pulumi
import pulumi_digitalocean as digitalocean

mysql_example = digitalocean.DatabaseCluster("mysql-example",
    engine="mysql",
    node_count=1,
    region="nyc1",
    size="db-s-1vcpu-1gb",
    version="8")
import pulumi
import pulumi_digitalocean as digitalocean

redis_example = digitalocean.DatabaseCluster("redis-example",
    engine="redis",
    node_count=1,
    region="nyc1",
    size="db-s-1vcpu-1gb",
    version="5")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • engine (pulumi.Input[str]) – Database engine used by the cluster (ex. pg for PostreSQL, mysql for MySQL, or redis for Redis).

  • eviction_policy (pulumi.Input[str]) – A string specifying the eviction policy for a Redis cluster. Valid values are: noeviction, allkeys_lru, allkeys_random, volatile_lru, volatile_random, or volatile_ttl.

  • maintenance_windows (pulumi.Input[list]) – Defines when the automatic maintenance should be performed for the database cluster.

  • name (pulumi.Input[str]) – The name of the database cluster.

  • node_count (pulumi.Input[float]) – Number of nodes that will be included in the cluster.

  • private_network_uuid (pulumi.Input[str]) – The ID of the VPC where the database cluster will be located.

  • region (pulumi.Input[str]) – DigitalOcean region where the cluster will reside.

  • size (pulumi.Input[str]) – Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

  • sql_mode (pulumi.Input[str]) – A comma separated string specifying the SQL modes for a MySQL cluster.

  • tags (pulumi.Input[list]) – A list of tag names to be applied to the database cluster.

  • version (pulumi.Input[str]) – Engine version used by the cluster (ex. 11 for PostgreSQL 11).

The maintenance_windows object supports the following:

  • day (pulumi.Input[str]) - The day of the week on which to apply maintenance updates.

  • hour (pulumi.Input[str]) - The hour in UTC at which maintenance updates will be applied in 24 hour format.

cluster_urn: pulumi.Output[str] = None

The uniform resource name of the database cluster.

database: pulumi.Output[str] = None

Name of the cluster’s default database.

engine: pulumi.Output[str] = None

Database engine used by the cluster (ex. pg for PostreSQL, mysql for MySQL, or redis for Redis).

eviction_policy: pulumi.Output[str] = None

A string specifying the eviction policy for a Redis cluster. Valid values are: noeviction, allkeys_lru, allkeys_random, volatile_lru, volatile_random, or volatile_ttl.

host: pulumi.Output[str] = None

Database cluster’s hostname.

maintenance_windows: pulumi.Output[list] = None

Defines when the automatic maintenance should be performed for the database cluster.

  • day (str) - The day of the week on which to apply maintenance updates.

  • hour (str) - The hour in UTC at which maintenance updates will be applied in 24 hour format.

name: pulumi.Output[str] = None

The name of the database cluster.

node_count: pulumi.Output[float] = None

Number of nodes that will be included in the cluster.

password: pulumi.Output[str] = None

Password for the cluster’s default user.

port: pulumi.Output[float] = None

Network port that the database cluster is listening on.

private_host: pulumi.Output[str] = None

Same as host, but only accessible from resources within the account and in the same region.

private_network_uuid: pulumi.Output[str] = None

The ID of the VPC where the database cluster will be located.

private_uri: pulumi.Output[str] = None

Same as uri, but only accessible from resources within the account and in the same region.

region: pulumi.Output[str] = None

DigitalOcean region where the cluster will reside.

size: pulumi.Output[str] = None

Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

sql_mode: pulumi.Output[str] = None

A comma separated string specifying the SQL modes for a MySQL cluster.

tags: pulumi.Output[list] = None

A list of tag names to be applied to the database cluster.

uri: pulumi.Output[str] = None

The full URI for connecting to the database cluster.

user: pulumi.Output[str] = None

Username for the cluster’s default user.

version: pulumi.Output[str] = None

Engine version used by the cluster (ex. 11 for PostgreSQL 11).

static get(resource_name, id, opts=None, cluster_urn=None, database=None, engine=None, eviction_policy=None, host=None, maintenance_windows=None, name=None, node_count=None, password=None, port=None, private_host=None, private_network_uuid=None, private_uri=None, region=None, size=None, sql_mode=None, tags=None, uri=None, user=None, version=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_urn (pulumi.Input[str]) – The uniform resource name of the database cluster.

  • database (pulumi.Input[str]) – Name of the cluster’s default database.

  • engine (pulumi.Input[str]) – Database engine used by the cluster (ex. pg for PostreSQL, mysql for MySQL, or redis for Redis).

  • eviction_policy (pulumi.Input[str]) – A string specifying the eviction policy for a Redis cluster. Valid values are: noeviction, allkeys_lru, allkeys_random, volatile_lru, volatile_random, or volatile_ttl.

  • host (pulumi.Input[str]) – Database cluster’s hostname.

  • maintenance_windows (pulumi.Input[list]) – Defines when the automatic maintenance should be performed for the database cluster.

  • name (pulumi.Input[str]) – The name of the database cluster.

  • node_count (pulumi.Input[float]) – Number of nodes that will be included in the cluster.

  • password (pulumi.Input[str]) – Password for the cluster’s default user.

  • port (pulumi.Input[float]) – Network port that the database cluster is listening on.

  • private_host (pulumi.Input[str]) – Same as host, but only accessible from resources within the account and in the same region.

  • private_network_uuid (pulumi.Input[str]) – The ID of the VPC where the database cluster will be located.

  • private_uri (pulumi.Input[str]) – Same as uri, but only accessible from resources within the account and in the same region.

  • region (pulumi.Input[str]) – DigitalOcean region where the cluster will reside.

  • size (pulumi.Input[str]) – Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

  • sql_mode (pulumi.Input[str]) – A comma separated string specifying the SQL modes for a MySQL cluster.

  • tags (pulumi.Input[list]) – A list of tag names to be applied to the database cluster.

  • uri (pulumi.Input[str]) – The full URI for connecting to the database cluster.

  • user (pulumi.Input[str]) – Username for the cluster’s default user.

  • version (pulumi.Input[str]) – Engine version used by the cluster (ex. 11 for PostgreSQL 11).

The maintenance_windows object supports the following:

  • day (pulumi.Input[str]) - The day of the week on which to apply maintenance updates.

  • hour (pulumi.Input[str]) - The hour in UTC at which maintenance updates will be applied in 24 hour format.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.DatabaseConnectionPool(resource_name, opts=None, cluster_id=None, db_name=None, mode=None, name=None, size=None, user=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean database connection pool resource.

import pulumi
import pulumi_digitalocean as digitalocean

postgres_example = digitalocean.DatabaseCluster("postgres-example",
    engine="pg",
    version="11",
    size="db-s-1vcpu-1gb",
    region="nyc1",
    node_count=1)
pool_01 = digitalocean.DatabaseConnectionPool("pool-01",
    cluster_id=postgres_example.id,
    mode="transaction",
    size=20,
    db_name="defaultdb",
    user="doadmin")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the source database cluster. Note: This must be a PostgreSQL cluster.

  • db_name (pulumi.Input[str]) – The database for use with the connection pool.

  • mode (pulumi.Input[str]) – The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.

  • name (pulumi.Input[str]) – The name for the database connection pool.

  • size (pulumi.Input[float]) – The desired size of the PGBouncer connection pool.

  • user (pulumi.Input[str]) – The name of the database user for use with the connection pool.

cluster_id: pulumi.Output[str] = None

The ID of the source database cluster. Note: This must be a PostgreSQL cluster.

db_name: pulumi.Output[str] = None

The database for use with the connection pool.

host: pulumi.Output[str] = None

The hostname used to connect to the database connection pool.

mode: pulumi.Output[str] = None

The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.

name: pulumi.Output[str] = None

The name for the database connection pool.

password: pulumi.Output[str] = None

Password for the connection pool’s user.

port: pulumi.Output[float] = None

Network port that the database connection pool is listening on.

private_host: pulumi.Output[str] = None

Same as host, but only accessible from resources within the account and in the same region.

private_uri: pulumi.Output[str] = None

Same as uri, but only accessible from resources within the account and in the same region.

size: pulumi.Output[float] = None

The desired size of the PGBouncer connection pool.

uri: pulumi.Output[str] = None

The full URI for connecting to the database connection pool.

user: pulumi.Output[str] = None

The name of the database user for use with the connection pool.

static get(resource_name, id, opts=None, cluster_id=None, db_name=None, host=None, mode=None, name=None, password=None, port=None, private_host=None, private_uri=None, size=None, uri=None, user=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the source database cluster. Note: This must be a PostgreSQL cluster.

  • db_name (pulumi.Input[str]) – The database for use with the connection pool.

  • host (pulumi.Input[str]) – The hostname used to connect to the database connection pool.

  • mode (pulumi.Input[str]) – The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.

  • name (pulumi.Input[str]) – The name for the database connection pool.

  • password (pulumi.Input[str]) – Password for the connection pool’s user.

  • port (pulumi.Input[float]) – Network port that the database connection pool is listening on.

  • private_host (pulumi.Input[str]) – Same as host, but only accessible from resources within the account and in the same region.

  • private_uri (pulumi.Input[str]) – Same as uri, but only accessible from resources within the account and in the same region.

  • size (pulumi.Input[float]) – The desired size of the PGBouncer connection pool.

  • uri (pulumi.Input[str]) – The full URI for connecting to the database connection pool.

  • user (pulumi.Input[str]) – The name of the database user for use with the connection pool.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.DatabaseDb(resource_name, opts=None, cluster_id=None, name=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean database resource. When creating a new database cluster, a default database with name defaultdb will be created. Then, this resource can be used to provide additional database inside the cluster.

import pulumi
import pulumi_digitalocean as digitalocean

postgres_example = digitalocean.DatabaseCluster("postgres-example",
    engine="pg",
    version="11",
    size="db-s-1vcpu-1gb",
    region="nyc1",
    node_count=1)
database_example = digitalocean.DatabaseDb("database-example", cluster_id=postgres_example.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the original source database cluster.

  • name (pulumi.Input[str]) – The name for the database.

cluster_id: pulumi.Output[str] = None

The ID of the original source database cluster.

name: pulumi.Output[str] = None

The name for the database.

static get(resource_name, id, opts=None, cluster_id=None, name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the original source database cluster.

  • name (pulumi.Input[str]) – The name for the database.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.DatabaseFirewall(resource_name, opts=None, cluster_id=None, rules=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean database firewall resource allowing you to restrict connections to your database to trusted sources. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses.

import pulumi
import pulumi_digitalocean as digitalocean

postgres_example = digitalocean.DatabaseCluster("postgres-example",
    engine="pg",
    version="11",
    size="db-s-1vcpu-1gb",
    region="nyc1",
    node_count=1)
example_fw = digitalocean.DatabaseFirewall("example-fw",
    cluster_id=postgres_example.id,
    rule=[
        {
            "type": "ip_addr",
            "value": "192.168.1.1",
        },
        {
            "type": "ip_addr",
            "value": "192.0.2.0",
        },
    ])
import pulumi
import pulumi_digitalocean as digitalocean

web = digitalocean.Droplet("web",
    size="s-1vcpu-1gb",
    image="centos-7-x64",
    region="nyc3")
postgres_example = digitalocean.DatabaseCluster("postgres-example",
    engine="pg",
    version="11",
    size="db-s-1vcpu-1gb",
    region="nyc1",
    node_count=1)
example_fw = digitalocean.DatabaseFirewall("example-fw",
    cluster_id=postgres_example.id,
    rule=[{
        "type": "droplet",
        "value": web.id,
    }])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the target database cluster.

  • rules (pulumi.Input[list]) – A rule specifying a resource allowed to access the database cluster. The following arguments must be specified:

- `type` - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: `droplet`, `k8s`, `ip_addr`, or `tag`.
- `value` - (Required) The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster.

The rules object supports the following:

  • created_at (pulumi.Input[str]) - The date and time when the firewall rule was created.

  • type (pulumi.Input[str])

  • uuid (pulumi.Input[str]) - A unique identifier for the firewall rule.

  • value (pulumi.Input[str])

cluster_id: pulumi.Output[str] = None

The ID of the target database cluster.

rules: pulumi.Output[list] = None

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified:

  • type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag.

  • value - (Required) The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster.

    • created_at (str) - The date and time when the firewall rule was created.

    • type (str)

    • uuid (str) - A unique identifier for the firewall rule.

    • value (str)

static get(resource_name, id, opts=None, cluster_id=None, rules=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the target database cluster.

  • rules (pulumi.Input[list]) – A rule specifying a resource allowed to access the database cluster. The following arguments must be specified:

- `type` - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: `droplet`, `k8s`, `ip_addr`, or `tag`.
- `value` - (Required) The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster.

The rules object supports the following:

  • created_at (pulumi.Input[str]) - The date and time when the firewall rule was created.

  • type (pulumi.Input[str])

  • uuid (pulumi.Input[str]) - A unique identifier for the firewall rule.

  • value (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.DatabaseReplica(resource_name, opts=None, cluster_id=None, name=None, private_network_uuid=None, region=None, size=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean database replica resource.

import pulumi
import pulumi_digitalocean as digitalocean

postgres_example = digitalocean.DatabaseCluster("postgres-example",
    engine="pg",
    version="11",
    size="db-s-1vcpu-1gb",
    region="nyc1",
    node_count=1)
read_replica = digitalocean.DatabaseReplica("read-replica",
    cluster_id=postgres_example.id,
    size="db-s-1vcpu-1gb",
    region="nyc1")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the original source database cluster.

  • name (pulumi.Input[str]) – The name for the database replica.

  • region (pulumi.Input[str]) – DigitalOcean region where the replica will reside.

  • size (pulumi.Input[str]) – Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

cluster_id: pulumi.Output[str] = None

The ID of the original source database cluster.

database: pulumi.Output[str] = None

Name of the replica’s default database.

host: pulumi.Output[str] = None

Database replica’s hostname.

name: pulumi.Output[str] = None

The name for the database replica.

password: pulumi.Output[str] = None

Password for the replica’s default user.

port: pulumi.Output[float] = None

Network port that the database replica is listening on.

private_host: pulumi.Output[str] = None

Same as host, but only accessible from resources within the account and in the same region.

private_uri: pulumi.Output[str] = None

Same as uri, but only accessible from resources within the account and in the same region.

region: pulumi.Output[str] = None

DigitalOcean region where the replica will reside.

size: pulumi.Output[str] = None

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

uri: pulumi.Output[str] = None

The full URI for connecting to the database replica.

user: pulumi.Output[str] = None

Username for the replica’s default user.

static get(resource_name, id, opts=None, cluster_id=None, database=None, host=None, name=None, password=None, port=None, private_host=None, private_network_uuid=None, private_uri=None, region=None, size=None, tags=None, uri=None, user=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the original source database cluster.

  • database (pulumi.Input[str]) – Name of the replica’s default database.

  • host (pulumi.Input[str]) – Database replica’s hostname.

  • name (pulumi.Input[str]) – The name for the database replica.

  • password (pulumi.Input[str]) – Password for the replica’s default user.

  • port (pulumi.Input[float]) – Network port that the database replica is listening on.

  • private_host (pulumi.Input[str]) – Same as host, but only accessible from resources within the account and in the same region.

  • private_uri (pulumi.Input[str]) – Same as uri, but only accessible from resources within the account and in the same region.

  • region (pulumi.Input[str]) – DigitalOcean region where the replica will reside.

  • size (pulumi.Input[str]) – Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

  • uri (pulumi.Input[str]) – The full URI for connecting to the database replica.

  • user (pulumi.Input[str]) – Username for the replica’s default user.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.DatabaseUser(resource_name, opts=None, cluster_id=None, mysql_auth_plugin=None, name=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean database user resource. When creating a new database cluster, a default admin user with name doadmin will be created. Then, this resource can be used to provide additional normal users inside the cluster.

NOTE: Any new users created will always have normal role, only the default user that comes with database cluster creation has primary role. Additional permissions must be managed manually.

import pulumi
import pulumi_digitalocean as digitalocean

postgres_example = digitalocean.DatabaseCluster("postgres-example",
    engine="pg",
    version="11",
    size="db-s-1vcpu-1gb",
    region="nyc1",
    node_count=1)
user_example = digitalocean.DatabaseUser("user-example", cluster_id=postgres_example.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the original source database cluster.

  • mysql_auth_plugin (pulumi.Input[str]) – The authentication method to use for connections to the MySQL user account. The valid values are mysql_native_password or caching_sha2_password (this is the default).

  • name (pulumi.Input[str]) – The name for the database user.

cluster_id: pulumi.Output[str] = None

The ID of the original source database cluster.

mysql_auth_plugin: pulumi.Output[str] = None

The authentication method to use for connections to the MySQL user account. The valid values are mysql_native_password or caching_sha2_password (this is the default).

name: pulumi.Output[str] = None

The name for the database user.

password: pulumi.Output[str] = None

Password for the database user.

role: pulumi.Output[str] = None

Role for the database user. The value will be either “primary” or “normal”.

static get(resource_name, id, opts=None, cluster_id=None, mysql_auth_plugin=None, name=None, password=None, role=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_id (pulumi.Input[str]) – The ID of the original source database cluster.

  • mysql_auth_plugin (pulumi.Input[str]) – The authentication method to use for connections to the MySQL user account. The valid values are mysql_native_password or caching_sha2_password (this is the default).

  • name (pulumi.Input[str]) – The name for the database user.

  • password (pulumi.Input[str]) – Password for the database user.

  • role (pulumi.Input[str]) – Role for the database user. The value will be either “primary” or “normal”.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.DnsRecord(resource_name, opts=None, domain=None, flags=None, name=None, port=None, priority=None, tag=None, ttl=None, type=None, value=None, weight=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean DNS record resource.

import pulumi
import pulumi_digitalocean as digitalocean

default = digitalocean.Domain("default", name="example.com")
# Add an A record to the domain for www.example.com.
www = digitalocean.DnsRecord("www",
    domain=default.name,
    type="A",
    value="192.168.0.11")
# Add a MX record for the example.com domain itself.
mx = digitalocean.DnsRecord("mx",
    domain=default.name,
    type="MX",
    priority=10,
    value="mail.example.com.")
pulumi.export("wwwFqdn", www.fqdn)
pulumi.export("mxFqdn", mx.fqdn)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • domain (pulumi.Input[str]) – The domain to add the record to.

  • flags (pulumi.Input[float]) – The flags of the record. Only valid when type is CAA. Must be between 0 and 255.

  • name (pulumi.Input[str]) – The name of the record. Use @ for records on domain’s name itself.

  • port (pulumi.Input[float]) – The port of the record. Only valid when type is SRV. Must be between 1 and 65535.

  • priority (pulumi.Input[float]) – The priority of the record. Only valid when type is MX or SRV. Must be between 0 and 65535.

  • tag (pulumi.Input[str]) – The tag of the record. Only valid when type is CAA. Must be one of issue, issuewild, or iodef.

  • ttl (pulumi.Input[float]) – The time to live for the record, in seconds. Must be at least 0.

  • type (pulumi.Input[str]) – The type of record. Must be one of A, AAAA, CAA, CNAME, MX, NS, TXT, or SRV.

  • value (pulumi.Input[str]) – The value of the record.

  • weight (pulumi.Input[float]) – The weight of the record. Only valid when type is SRV. Must be between 0 and 65535.

domain: pulumi.Output[str] = None

The domain to add the record to.

flags: pulumi.Output[float] = None

The flags of the record. Only valid when type is CAA. Must be between 0 and 255.

fqdn: pulumi.Output[str] = None

The FQDN of the record

name: pulumi.Output[str] = None

The name of the record. Use @ for records on domain’s name itself.

port: pulumi.Output[float] = None

The port of the record. Only valid when type is SRV. Must be between 1 and 65535.

priority: pulumi.Output[float] = None

The priority of the record. Only valid when type is MX or SRV. Must be between 0 and 65535.

tag: pulumi.Output[str] = None

The tag of the record. Only valid when type is CAA. Must be one of issue, issuewild, or iodef.

ttl: pulumi.Output[float] = None

The time to live for the record, in seconds. Must be at least 0.

type: pulumi.Output[str] = None

The type of record. Must be one of A, AAAA, CAA, CNAME, MX, NS, TXT, or SRV.

value: pulumi.Output[str] = None

The value of the record.

weight: pulumi.Output[float] = None

The weight of the record. Only valid when type is SRV. Must be between 0 and 65535.

static get(resource_name, id, opts=None, domain=None, flags=None, fqdn=None, name=None, port=None, priority=None, tag=None, ttl=None, type=None, value=None, weight=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • domain (pulumi.Input[str]) – The domain to add the record to.

  • flags (pulumi.Input[float]) – The flags of the record. Only valid when type is CAA. Must be between 0 and 255.

  • fqdn (pulumi.Input[str]) – The FQDN of the record

  • name (pulumi.Input[str]) – The name of the record. Use @ for records on domain’s name itself.

  • port (pulumi.Input[float]) – The port of the record. Only valid when type is SRV. Must be between 1 and 65535.

  • priority (pulumi.Input[float]) – The priority of the record. Only valid when type is MX or SRV. Must be between 0 and 65535.

  • tag (pulumi.Input[str]) – The tag of the record. Only valid when type is CAA. Must be one of issue, issuewild, or iodef.

  • ttl (pulumi.Input[float]) – The time to live for the record, in seconds. Must be at least 0.

  • type (pulumi.Input[str]) – The type of record. Must be one of A, AAAA, CAA, CNAME, MX, NS, TXT, or SRV.

  • value (pulumi.Input[str]) – The value of the record.

  • weight (pulumi.Input[float]) – The weight of the record. Only valid when type is SRV. Must be between 0 and 65535.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Domain(resource_name, opts=None, ip_address=None, name=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean domain resource.

import pulumi
import pulumi_digitalocean as digitalocean

# Create a new domain
default = digitalocean.Domain("default",
    name="example.com",
    ip_address=digitalocean_droplet["foo"]["ipv4_address"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • ip_address (pulumi.Input[str]) – The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

  • name (pulumi.Input[str]) – The name of the domain

domain_urn: pulumi.Output[str] = None

The uniform resource name of the domain

ip_address: pulumi.Output[str] = None

The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

name: pulumi.Output[str] = None

The name of the domain

static get(resource_name, id, opts=None, domain_urn=None, ip_address=None, name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • domain_urn (pulumi.Input[str]) – The uniform resource name of the domain

  • ip_address (pulumi.Input[str]) – The IP address of the domain. If specified, this IP is used to created an initial A record for the domain.

  • name (pulumi.Input[str]) – The name of the domain

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Droplet(resource_name, opts=None, backups=None, image=None, ipv6=None, monitoring=None, name=None, private_networking=None, region=None, resize_disk=None, size=None, ssh_keys=None, tags=None, user_data=None, volume_ids=None, vpc_uuid=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Droplet resource. This can be used to create, modify, and delete Droplets. Droplets also support provisioning.

import pulumi
import pulumi_digitalocean as digitalocean

# Create a new Web Droplet in the nyc2 region
web = digitalocean.Droplet("web",
    image="ubuntu-18-04-x64",
    region="nyc2",
    size="s-1vcpu-1gb")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • backups (pulumi.Input[bool]) – Boolean controlling if backups are made. Defaults to false.

  • image (pulumi.Input[str]) – The Droplet image ID or slug.

  • ipv6 (pulumi.Input[bool]) – Boolean controlling if IPv6 is enabled. Defaults to false.

  • monitoring (pulumi.Input[bool]) – Boolean controlling whether monitoring agent is installed. Defaults to false.

  • name (pulumi.Input[str]) – The Droplet name.

  • private_networking (pulumi.Input[bool]) – Boolean controlling if private networking is enabled. When VPC is enabled on an account, this will provision the Droplet inside of your account’s default VPC for the region. Use the vpc_uuid attribute to specify a different VPC.

  • region (pulumi.Input[str]) – The region to start in.

  • resize_disk (pulumi.Input[bool]) – Boolean controlling whether to increase the disk size when resizing a Droplet. It defaults to true. When set to false, only the Droplet’s RAM and CPU will be resized. Increasing a Droplet’s disk size is a permanent change. Increasing only RAM and CPU is reversible.

  • size (pulumi.Input[str]) – The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

  • ssh_keys (pulumi.Input[list]) – A list of SSH IDs or fingerprints to enable in the format [12345, 123456]. To retrieve this info, use a tool such as curl with the DigitalOcean API, to retrieve them.

  • tags (pulumi.Input[list]) – A list of the tags to be applied to this Droplet.

  • user_data (pulumi.Input[str]) – A string of the desired User Data for the Droplet.

  • volume_ids (pulumi.Input[list]) – A list of the IDs of each block storage volume to be attached to the Droplet.

  • vpc_uuid (pulumi.Input[str]) – The ID of the VPC where the Droplet will be located.

backups: pulumi.Output[bool] = None

Boolean controlling if backups are made. Defaults to false.

disk: pulumi.Output[float] = None

The size of the instance’s disk in GB

droplet_urn: pulumi.Output[str] = None

The uniform resource name of the Droplet

  • name- The name of the Droplet

image: pulumi.Output[str] = None

The Droplet image ID or slug.

ipv4_address: pulumi.Output[str] = None

The IPv4 address

ipv4_address_private: pulumi.Output[str] = None

The private networking IPv4 address

ipv6: pulumi.Output[bool] = None

Boolean controlling if IPv6 is enabled. Defaults to false.

ipv6_address: pulumi.Output[str] = None

The IPv6 address

locked: pulumi.Output[bool] = None

Is the Droplet locked

monitoring: pulumi.Output[bool] = None

Boolean controlling whether monitoring agent is installed. Defaults to false.

name: pulumi.Output[str] = None

The Droplet name.

price_hourly: pulumi.Output[float] = None

Droplet hourly price

price_monthly: pulumi.Output[float] = None

Droplet monthly price

private_networking: pulumi.Output[bool] = None

Boolean controlling if private networking is enabled. When VPC is enabled on an account, this will provision the Droplet inside of your account’s default VPC for the region. Use the vpc_uuid attribute to specify a different VPC.

region: pulumi.Output[str] = None

The region to start in.

resize_disk: pulumi.Output[bool] = None

Boolean controlling whether to increase the disk size when resizing a Droplet. It defaults to true. When set to false, only the Droplet’s RAM and CPU will be resized. Increasing a Droplet’s disk size is a permanent change. Increasing only RAM and CPU is reversible.

size: pulumi.Output[str] = None

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

ssh_keys: pulumi.Output[list] = None

A list of SSH IDs or fingerprints to enable in the format [12345, 123456]. To retrieve this info, use a tool such as curl with the DigitalOcean API, to retrieve them.

status: pulumi.Output[str] = None

The status of the Droplet

tags: pulumi.Output[list] = None

A list of the tags to be applied to this Droplet.

user_data: pulumi.Output[str] = None

A string of the desired User Data for the Droplet.

vcpus: pulumi.Output[float] = None

The number of the instance’s virtual CPUs

volume_ids: pulumi.Output[list] = None

A list of the IDs of each block storage volume to be attached to the Droplet.

vpc_uuid: pulumi.Output[str] = None

The ID of the VPC where the Droplet will be located.

static get(resource_name, id, opts=None, backups=None, created_at=None, disk=None, droplet_urn=None, image=None, ipv4_address=None, ipv4_address_private=None, ipv6=None, ipv6_address=None, locked=None, memory=None, monitoring=None, name=None, price_hourly=None, price_monthly=None, private_networking=None, region=None, resize_disk=None, size=None, ssh_keys=None, status=None, tags=None, user_data=None, vcpus=None, volume_ids=None, vpc_uuid=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • backups (pulumi.Input[bool]) – Boolean controlling if backups are made. Defaults to false.

  • disk (pulumi.Input[float]) – The size of the instance’s disk in GB

  • droplet_urn (pulumi.Input[str]) – The uniform resource name of the Droplet

* `name`- The name of the Droplet
Parameters
  • image (pulumi.Input[str]) – The Droplet image ID or slug.

  • ipv4_address (pulumi.Input[str]) – The IPv4 address

  • ipv4_address_private (pulumi.Input[str]) – The private networking IPv4 address

  • ipv6 (pulumi.Input[bool]) – Boolean controlling if IPv6 is enabled. Defaults to false.

  • ipv6_address (pulumi.Input[str]) – The IPv6 address

  • locked (pulumi.Input[bool]) – Is the Droplet locked

  • monitoring (pulumi.Input[bool]) – Boolean controlling whether monitoring agent is installed. Defaults to false.

  • name (pulumi.Input[str]) – The Droplet name.

  • price_hourly (pulumi.Input[float]) – Droplet hourly price

  • price_monthly (pulumi.Input[float]) – Droplet monthly price

  • private_networking (pulumi.Input[bool]) – Boolean controlling if private networking is enabled. When VPC is enabled on an account, this will provision the Droplet inside of your account’s default VPC for the region. Use the vpc_uuid attribute to specify a different VPC.

  • region (pulumi.Input[str]) – The region to start in.

  • resize_disk (pulumi.Input[bool]) – Boolean controlling whether to increase the disk size when resizing a Droplet. It defaults to true. When set to false, only the Droplet’s RAM and CPU will be resized. Increasing a Droplet’s disk size is a permanent change. Increasing only RAM and CPU is reversible.

  • size (pulumi.Input[str]) –

    The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

  • ssh_keys (pulumi.Input[list]) –

    A list of SSH IDs or fingerprints to enable in the format [12345, 123456]. To retrieve this info, use a tool such as curl with the DigitalOcean API, to retrieve them.

  • status (pulumi.Input[str]) – The status of the Droplet

  • tags (pulumi.Input[list]) – A list of the tags to be applied to this Droplet.

  • user_data (pulumi.Input[str]) – A string of the desired User Data for the Droplet.

  • vcpus (pulumi.Input[float]) – The number of the instance’s virtual CPUs

  • volume_ids (pulumi.Input[list]) –

    A list of the IDs of each block storage volume to be attached to the Droplet.

  • vpc_uuid (pulumi.Input[str]) – The ID of the VPC where the Droplet will be located.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.DropletSnapshot(resource_name, opts=None, droplet_id=None, name=None, __props__=None, __name__=None, __opts__=None)

Provides a resource which can be used to create a snapshot from an existing DigitalOcean Droplet.

import pulumi
import pulumi_digitalocean as digitalocean

web = digitalocean.Droplet("web",
    size="s-1vcpu-1gb",
    image="centos-7-x64",
    region="nyc3")
web_snapshot = digitalocean.DropletSnapshot("web-snapshot", droplet_id=web.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • droplet_id (pulumi.Input[str]) – The ID of the Droplet from which the snapshot will be taken.

  • name (pulumi.Input[str]) – A name for the Droplet snapshot.

created_at: pulumi.Output[str] = None

The date and time the Droplet snapshot was created.

droplet_id: pulumi.Output[str] = None

The ID of the Droplet from which the snapshot will be taken.

min_disk_size: pulumi.Output[float] = None

The minimum size in gigabytes required for a Droplet to be created based on this snapshot.

name: pulumi.Output[str] = None

A name for the Droplet snapshot.

regions: pulumi.Output[list] = None

A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.

size: pulumi.Output[float] = None

The billable size of the Droplet snapshot in gigabytes.

static get(resource_name, id, opts=None, created_at=None, droplet_id=None, min_disk_size=None, name=None, regions=None, size=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • created_at (pulumi.Input[str]) – The date and time the Droplet snapshot was created.

  • droplet_id (pulumi.Input[str]) – The ID of the Droplet from which the snapshot will be taken.

  • min_disk_size (pulumi.Input[float]) – The minimum size in gigabytes required for a Droplet to be created based on this snapshot.

  • name (pulumi.Input[str]) – A name for the Droplet snapshot.

  • regions (pulumi.Input[list]) – A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.

  • size (pulumi.Input[float]) – The billable size of the Droplet snapshot in gigabytes.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Firewall(resource_name, opts=None, droplet_ids=None, inbound_rules=None, name=None, outbound_rules=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Cloud Firewall resource. This can be used to create, modify, and delete Firewalls.

import pulumi
import pulumi_digitalocean as digitalocean

web_droplet = digitalocean.Droplet("webDroplet",
    size="s-1vcpu-1gb",
    image="ubuntu-18-04-x64",
    region="nyc3")
web_firewall = digitalocean.Firewall("webFirewall",
    droplet_ids=[web_droplet.id],
    inbound_rule=[
        {
            "protocol": "tcp",
            "portRange": "22",
            "sourceAddresses": [
                "192.168.1.0/24",
                "2002:1:2::/48",
            ],
        },
        {
            "protocol": "tcp",
            "portRange": "80",
            "sourceAddresses": [
                "0.0.0.0/0",
                "::/0",
            ],
        },
        {
            "protocol": "tcp",
            "portRange": "443",
            "sourceAddresses": [
                "0.0.0.0/0",
                "::/0",
            ],
        },
        {
            "protocol": "icmp",
            "sourceAddresses": [
                "0.0.0.0/0",
                "::/0",
            ],
        },
    ],
    outbound_rule=[
        {
            "protocol": "tcp",
            "portRange": "53",
            "destinationAddresses": [
                "0.0.0.0/0",
                "::/0",
            ],
        },
        {
            "protocol": "udp",
            "portRange": "53",
            "destinationAddresses": [
                "0.0.0.0/0",
                "::/0",
            ],
        },
        {
            "protocol": "icmp",
            "destinationAddresses": [
                "0.0.0.0/0",
                "::/0",
            ],
        },
    ])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • droplet_ids (pulumi.Input[list]) – The list of the IDs of the Droplets assigned to the Firewall.

  • inbound_rules (pulumi.Input[list]) – The inbound access rule block for the Firewall. The inbound_rule block is documented below.

  • name (pulumi.Input[str]) – The Firewall name

  • outbound_rules (pulumi.Input[list]) – The outbound access rule block for the Firewall. The outbound_rule block is documented below.

  • tags (pulumi.Input[list]) – The names of the Tags assigned to the Firewall.

The inbound_rules object supports the following:

  • portRange (pulumi.Input[str]) - The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is tcp or udp.

  • protocol (pulumi.Input[str]) - The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.

  • sourceAddresses (pulumi.Input[list]) - An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the inbound traffic will be accepted.

  • sourceDropletIds (pulumi.Input[list]) - An array containing the IDs of the Droplets from which the inbound traffic will be accepted.

  • sourceLoadBalancerUids (pulumi.Input[list]) - An array containing the IDs of the Load Balancers from which the inbound traffic will be accepted.

  • sourceTags (pulumi.Input[list]) - An array containing the names of Tags corresponding to groups of Droplets from which the inbound traffic will be accepted.

The outbound_rules object supports the following:

  • destinationAddresses (pulumi.Input[list]) - An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the outbound traffic will be allowed.

  • destinationDropletIds (pulumi.Input[list]) - An array containing the IDs of the Droplets to which the outbound traffic will be allowed.

  • destinationLoadBalancerUids (pulumi.Input[list]) - An array containing the IDs of the Load Balancers to which the outbound traffic will be allowed.

  • destinationTags (pulumi.Input[list]) - An array containing the names of Tags corresponding to groups of Droplets to which the outbound traffic will be allowed. traffic.

  • portRange (pulumi.Input[str]) - The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is tcp or udp.

  • protocol (pulumi.Input[str]) - The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.

created_at: pulumi.Output[str] = None

A time value given in ISO8601 combined date and time format that represents when the Firewall was created.

droplet_ids: pulumi.Output[list] = None

The list of the IDs of the Droplets assigned to the Firewall.

inbound_rules: pulumi.Output[list] = None

The inbound access rule block for the Firewall. The inbound_rule block is documented below.

  • portRange (str) - The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is tcp or udp.

  • protocol (str) - The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.

  • sourceAddresses (list) - An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the inbound traffic will be accepted.

  • sourceDropletIds (list) - An array containing the IDs of the Droplets from which the inbound traffic will be accepted.

  • sourceLoadBalancerUids (list) - An array containing the IDs of the Load Balancers from which the inbound traffic will be accepted.

  • sourceTags (list) - An array containing the names of Tags corresponding to groups of Droplets from which the inbound traffic will be accepted.

name: pulumi.Output[str] = None

The Firewall name

outbound_rules: pulumi.Output[list] = None

The outbound access rule block for the Firewall. The outbound_rule block is documented below.

  • destinationAddresses (list) - An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the outbound traffic will be allowed.

  • destinationDropletIds (list) - An array containing the IDs of the Droplets to which the outbound traffic will be allowed.

  • destinationLoadBalancerUids (list) - An array containing the IDs of the Load Balancers to which the outbound traffic will be allowed.

  • destinationTags (list) - An array containing the names of Tags corresponding to groups of Droplets to which the outbound traffic will be allowed. traffic.

  • portRange (str) - The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is tcp or udp.

  • protocol (str) - The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.

pending_changes: pulumi.Output[list] = None

An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.

  • droplet_id (float)

  • removing (bool)

  • status (str) - A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.

status: pulumi.Output[str] = None

A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.

tags: pulumi.Output[list] = None

The names of the Tags assigned to the Firewall.

static get(resource_name, id, opts=None, created_at=None, droplet_ids=None, inbound_rules=None, name=None, outbound_rules=None, pending_changes=None, status=None, tags=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • created_at (pulumi.Input[str]) – A time value given in ISO8601 combined date and time format that represents when the Firewall was created.

  • droplet_ids (pulumi.Input[list]) – The list of the IDs of the Droplets assigned to the Firewall.

  • inbound_rules (pulumi.Input[list]) – The inbound access rule block for the Firewall. The inbound_rule block is documented below.

  • name (pulumi.Input[str]) – The Firewall name

  • outbound_rules (pulumi.Input[list]) – The outbound access rule block for the Firewall. The outbound_rule block is documented below.

  • pending_changes (pulumi.Input[list]) – An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.

  • status (pulumi.Input[str]) – A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.

  • tags (pulumi.Input[list]) – The names of the Tags assigned to the Firewall.

The inbound_rules object supports the following:

  • portRange (pulumi.Input[str]) - The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is tcp or udp.

  • protocol (pulumi.Input[str]) - The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.

  • sourceAddresses (pulumi.Input[list]) - An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the inbound traffic will be accepted.

  • sourceDropletIds (pulumi.Input[list]) - An array containing the IDs of the Droplets from which the inbound traffic will be accepted.

  • sourceLoadBalancerUids (pulumi.Input[list]) - An array containing the IDs of the Load Balancers from which the inbound traffic will be accepted.

  • sourceTags (pulumi.Input[list]) - An array containing the names of Tags corresponding to groups of Droplets from which the inbound traffic will be accepted.

The outbound_rules object supports the following:

  • destinationAddresses (pulumi.Input[list]) - An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the outbound traffic will be allowed.

  • destinationDropletIds (pulumi.Input[list]) - An array containing the IDs of the Droplets to which the outbound traffic will be allowed.

  • destinationLoadBalancerUids (pulumi.Input[list]) - An array containing the IDs of the Load Balancers to which the outbound traffic will be allowed.

  • destinationTags (pulumi.Input[list]) - An array containing the names of Tags corresponding to groups of Droplets to which the outbound traffic will be allowed. traffic.

  • portRange (pulumi.Input[str]) - The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is tcp or udp.

  • protocol (pulumi.Input[str]) - The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.

The pending_changes object supports the following:

  • droplet_id (pulumi.Input[float])

  • removing (pulumi.Input[bool])

  • status (pulumi.Input[str]) - A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.FloatingIp(resource_name, opts=None, droplet_id=None, ip_address=None, region=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Floating IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Droplets.

NOTE: Floating IPs can be assigned to a Droplet either directly on the .FloatingIp resource by setting a droplet_id or using the .FloatingIpAssignment resource, but the two cannot be used together.

import pulumi
import pulumi_digitalocean as digitalocean

foobar_droplet = digitalocean.Droplet("foobarDroplet",
    size="s-1vcpu-1gb",
    image="ubuntu-18-04-x64",
    region="sgp1",
    ipv6=True,
    private_networking=True)
foobar_floating_ip = digitalocean.FloatingIp("foobarFloatingIp",
    droplet_id=foobar_droplet.id,
    region=foobar_droplet.region)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • droplet_id (pulumi.Input[float]) – The ID of Droplet that the Floating IP will be assigned to.

  • ip_address (pulumi.Input[str]) – The IP Address of the resource

  • region (pulumi.Input[str]) – The region that the Floating IP is reserved to.

droplet_id: pulumi.Output[float] = None

The ID of Droplet that the Floating IP will be assigned to.

floating_ip_urn: pulumi.Output[str] = None

The uniform resource name of the floating ip

ip_address: pulumi.Output[str] = None

The IP Address of the resource

region: pulumi.Output[str] = None

The region that the Floating IP is reserved to.

static get(resource_name, id, opts=None, droplet_id=None, floating_ip_urn=None, ip_address=None, region=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • droplet_id (pulumi.Input[float]) – The ID of Droplet that the Floating IP will be assigned to.

  • floating_ip_urn (pulumi.Input[str]) – The uniform resource name of the floating ip

  • ip_address (pulumi.Input[str]) – The IP Address of the resource

  • region (pulumi.Input[str]) – The region that the Floating IP is reserved to.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.FloatingIpAssignment(resource_name, opts=None, droplet_id=None, ip_address=None, __props__=None, __name__=None, __opts__=None)

Provides a resource for assigning an existing DigitalOcean Floating IP to a Droplet. This makes it easy to provision floating IP addresses that are not tied to the lifecycle of your Droplet.

import pulumi
import pulumi_digitalocean as digitalocean

foobar_floating_ip = digitalocean.FloatingIp("foobarFloatingIp", region="sgp1")
foobar_droplet = digitalocean.Droplet("foobarDroplet",
    size="s-1vcpu-1gb",
    image="ubuntu-18-04-x64",
    region="sgp1",
    ipv6=True,
    private_networking=True)
foobar_floating_ip_assignment = digitalocean.FloatingIpAssignment("foobarFloatingIpAssignment",
    ip_address=foobar_floating_ip.ip_address,
    droplet_id=foobar_droplet.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • droplet_id (pulumi.Input[float]) – The ID of Droplet that the Floating IP will be assigned to.

  • ip_address (pulumi.Input[str]) – The Floating IP to assign to the Droplet.

droplet_id: pulumi.Output[float] = None

The ID of Droplet that the Floating IP will be assigned to.

ip_address: pulumi.Output[str] = None

The Floating IP to assign to the Droplet.

static get(resource_name, id, opts=None, droplet_id=None, ip_address=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • droplet_id (pulumi.Input[float]) – The ID of Droplet that the Floating IP will be assigned to.

  • ip_address (pulumi.Input[str]) – The Floating IP to assign to the Droplet.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.GetAccountResult(droplet_limit=None, email=None, email_verified=None, floating_ip_limit=None, id=None, status=None, status_message=None, uuid=None)

A collection of values returned by getAccount.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetCertificateResult(domains=None, id=None, name=None, not_after=None, sha1_fingerprint=None, state=None, type=None)

A collection of values returned by getCertificate.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetContainerRegistryResult(endpoint=None, id=None, name=None, server_url=None)

A collection of values returned by getContainerRegistry.

id = None

The provider-assigned unique ID for this managed resource.

name = None

The name of the container registry

  • endpoint: The URL endpoint of the container registry. Ex: registry.digitalocean.com/my_registry

  • server_url: The domain of the container registry. Ex: registry.digitalocean.com

class pulumi_digitalocean.GetDatabaseClusterResult(database=None, engine=None, host=None, id=None, maintenance_windows=None, name=None, node_count=None, password=None, port=None, private_host=None, private_network_uuid=None, private_uri=None, region=None, size=None, tags=None, uri=None, urn=None, user=None, version=None)

A collection of values returned by getDatabaseCluster.

database = None

Name of the cluster’s default database.

engine = None

Database engine used by the cluster (ex. pg for PostreSQL).

host = None

Database cluster’s hostname.

id = None

The provider-assigned unique ID for this managed resource.

maintenance_windows = None

Defines when the automatic maintenance should be performed for the database cluster.

node_count = None

Number of nodes that will be included in the cluster.

password = None

Password for the cluster’s default user.

port = None

Network port that the database cluster is listening on.

private_host = None

Same as host, but only accessible from resources within the account and in the same region.

private_network_uuid = None

The ID of the VPC where the database cluster is located.

private_uri = None

Same as uri, but only accessible from resources within the account and in the same region.

region = None

DigitalOcean region where the cluster will reside.

size = None

Database droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

uri = None

The full URI for connecting to the database cluster.

urn = None

The uniform resource name of the database cluster.

user = None

Username for the cluster’s default user.

version = None

Engine version used by the cluster (ex. 11 for PostgreSQL 11).

class pulumi_digitalocean.GetDomainResult(domain_urn=None, id=None, name=None, ttl=None, zone_file=None)

A collection of values returned by getDomain.

domain_urn = None

The uniform resource name of the domain

  • zone_file: The zone file of the domain.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetDropletResult(backups=None, created_at=None, disk=None, id=None, image=None, ipv4_address=None, ipv4_address_private=None, ipv6=None, ipv6_address=None, ipv6_address_private=None, locked=None, memory=None, monitoring=None, name=None, price_hourly=None, price_monthly=None, private_networking=None, region=None, size=None, status=None, tag=None, tags=None, urn=None, vcpus=None, volume_ids=None, vpc_uuid=None)

A collection of values returned by getDroplet.

backups = None

Whether backups are enabled.

disk = None

The size of the Droplets disk in GB.

image = None

The Droplet image ID or slug.

ipv4_address = None

The Droplets public IPv4 address

ipv4_address_private = None

The Droplets private IPv4 address

ipv6 = None

Whether IPv6 is enabled.

ipv6_address = None

The Droplets public IPv6 address

ipv6_address_private = None

The Droplets private IPv6 address

locked = None

Whether the Droplet is locked.

memory = None

The amount of the Droplets memory in MB.

monitoring = None

Whether monitoring agent is installed.

price_hourly = None

Droplet hourly price.

price_monthly = None

Droplet monthly price.

private_networking = None

Whether private networks are enabled.

region = None

The region the Droplet is running in.

size = None

The unique slug that indentifies the type of Droplet.

status = None

The status of the Droplet.

tags = None

A list of the tags associated to the Droplet.

urn = None

The uniform resource name of the Droplet

vcpus = None

The number of the Droplets virtual CPUs.

volume_ids = None

List of the IDs of each volumes attached to the Droplet.

vpc_uuid = None

The ID of the VPC where the Droplet is located.

class pulumi_digitalocean.GetDropletSnapshotResult(created_at=None, droplet_id=None, id=None, min_disk_size=None, most_recent=None, name=None, name_regex=None, region=None, regions=None, size=None)

A collection of values returned by getDropletSnapshot.

created_at = None

The date and time the Droplet snapshot was created.

droplet_id = None

The ID of the Droplet from which the Droplet snapshot originated.

id = None

The provider-assigned unique ID for this managed resource.

min_disk_size = None

The minimum size in gigabytes required for a Droplet to be created based on this Droplet snapshot.

regions = None

A list of DigitalOcean region “slugs” indicating where the Droplet snapshot is available.

size = None

The billable size of the Droplet snapshot in gigabytes.

class pulumi_digitalocean.GetDropletsResult(droplets=None, filters=None, id=None, sorts=None)

A collection of values returned by getDroplets.

droplets = None

A list of Droplets satisfying any filter and sort criteria. Each Droplet has the following attributes:

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetFloatingIpResult(droplet_id=None, floating_ip_urn=None, id=None, ip_address=None, region=None)

A collection of values returned by getFloatingIp.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetImageResult(created=None, distribution=None, error_message=None, id=None, image=None, min_disk_size=None, name=None, private=None, regions=None, size_gigabytes=None, slug=None, source=None, status=None, tags=None, type=None)

A collection of values returned by getImage.

distribution = None

The name of the distribution of the OS of the image.

  • min_disk_size: The minimum ‘disk’ required for the image.

  • size_gigabytes: The size of the image in GB.

image = None

The id of the image (legacy parameter).

private = None

Is image a public image or not. Public images represent Linux distributions or One-Click Applications, while non-public images represent snapshots and backups and are only available within your account.

  • regions: A set of the regions that the image is available in.

  • tags: A set of tags applied to the image

  • created: When the image was created

  • status: Current status of the image

  • error_message: Any applicable error message pertaining to the image

class pulumi_digitalocean.GetImagesResult(filters=None, id=None, images=None, sorts=None)

A collection of values returned by getImages.

id = None

The provider-assigned unique ID for this managed resource.

images = None

A set of images satisfying any filter and sort criteria. Each image has the following attributes:

  • slug: Unique text identifier of the image.

  • id: The ID of the image.

  • name: The name of the image.

  • type: Type of the image.

  • distribution - The name of the distribution of the OS of the image.

  • min_disk_size: The minimum ‘disk’ required for the image.

  • size_gigabytes: The size of the image in GB.

  • private - Is image a public image or not. Public images represent Linux distributions or One-Click Applications, while non-public images represent snapshots and backups and are only available within your account.

  • regions: A set of the regions that the image is available in.

  • tags: A set of tags applied to the image

  • created: When the image was created

  • status: Current status of the image

  • error_message: Any applicable error message pertaining to the image

  • image - The id of the image (legacy parameter).

class pulumi_digitalocean.GetKubernetesClusterResult(cluster_subnet=None, created_at=None, endpoint=None, id=None, ipv4_address=None, kube_configs=None, name=None, node_pools=None, region=None, service_subnet=None, status=None, tags=None, updated_at=None, version=None, vpc_uuid=None)

A collection of values returned by getKubernetesCluster.

cluster_subnet = None

The range of IP addresses in the overlay network of the Kubernetes cluster.

created_at = None

The date and time when the Kubernetes cluster was created.

endpoint = None

The base URL of the API server on the Kubernetes master node.

id = None

The provider-assigned unique ID for this managed resource.

ipv4_address = None

The public IPv4 address of the Kubernetes master node.

node_pools = None

A list of node pools associated with the cluster. Each node pool exports the following attributes:

  • id - The unique ID that can be used to identify and reference the node pool.

  • name - The name of the node pool.

  • size - The slug identifier for the type of Droplet used as workers in the node pool.

  • node_count - The number of Droplet instances in the node pool.

  • actual_node_count - The actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

  • auto_scale - A boolean indicating whether auto-scaling is enabled on the node pool.

  • min_nodes - If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

  • max_nodes - If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

  • tags - A list of tag names applied to the node pool.

  • labels - A map of key/value pairs applied to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

  • nodes - A list of nodes in the pool. Each node exports the following attributes:

  • id - A unique ID that can be used to identify and reference the node.

  • name - The auto-generated name for the node.

  • status - A string indicating the current status of the individual node.

  • created_at - The date and time when the node was created.

  • updated_at - The date and time when the node was last updated.

region = None

The slug identifier for the region where the Kubernetes cluster is located.

service_subnet = None

The range of assignable IP addresses for services running in the Kubernetes cluster.

status = None

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

tags = None

A list of tag names to be applied to the Kubernetes cluster.

updated_at = None

The date and time when the Kubernetes cluster was last updated.

  • kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes:

  • raw_config - The full contents of the Kubernetes cluster’s kubeconfig file.

  • host - The URL of the API server on the Kubernetes master node.

  • cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority.

  • token - The DigitalOcean API access token used by clients to access the cluster.

  • client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

  • client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

  • expires_at - The date and time when the credentials will expire and need to be regenerated.

version = None

The slug identifier for the version of Kubernetes used for the cluster.

vpc_uuid = None

The ID of the VPC where the Kubernetes cluster is located.

class pulumi_digitalocean.GetKubernetesVersionsResult(id=None, latest_version=None, valid_versions=None, version_prefix=None)

A collection of values returned by getKubernetesVersions.

id = None

The provider-assigned unique ID for this managed resource.

latest_version = None

The most recent version available.

valid_versions = None

A list of available versions.

class pulumi_digitalocean.GetLoadBalancerResult(algorithm=None, droplet_ids=None, droplet_tag=None, enable_backend_keepalive=None, enable_proxy_protocol=None, forwarding_rules=None, healthcheck=None, id=None, ip=None, load_balancer_urn=None, name=None, redirect_http_to_https=None, region=None, status=None, sticky_sessions=None, vpc_uuid=None)

A collection of values returned by getLoadBalancer.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetProjectResult(created_at=None, description=None, environment=None, id=None, is_default=None, name=None, owner_id=None, owner_uuid=None, purpose=None, resources=None, updated_at=None)

A collection of values returned by getProject.

created_at = None

The date and time when the project was created, (ISO8601)

description = None

The description of the project

environment = None

The environment of the project’s resources. The possible values are: Development, Staging, Production.

owner_id = None

The ID of the project owner.

owner_uuid = None

The unique universal identifier of the project owner.

purpose = None

The purpose of the project, (Default: “Web Application”)

resources = None

A set of uniform resource names (URNs) for the resources associated with the project

updated_at = None

The date and time when the project was last updated, (ISO8601)

class pulumi_digitalocean.GetProjectsResult(filters=None, id=None, projects=None, sorts=None)

A collection of values returned by getProjects.

id = None

The provider-assigned unique ID for this managed resource.

projects = None

A set of projects satisfying any filter and sort criteria. Each project has the following attributes:

  • id - The ID of the project

  • name - The name of the project

  • description - The description of the project

  • purpose - The purpose of the project (Default: “Web Application”)

  • environment - The environment of the project’s resources. The possible values are: Development, Staging, Production.

  • resources - A set of uniform resource names (URNs) for the resources associated with the project

  • owner_uuid - The unique universal identifier of the project owner

  • owner_id - The ID of the project owner

  • created_at - The date and time when the project was created, (ISO8601)

  • updated_at - The date and time when the project was last updated, (ISO8601)

class pulumi_digitalocean.GetRecordResult(data=None, domain=None, flags=None, id=None, name=None, port=None, priority=None, tag=None, ttl=None, type=None, weight=None)

A collection of values returned by getRecord.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetRegionResult(available=None, features=None, id=None, name=None, sizes=None, slug=None)

A collection of values returned by getRegion.

available = None

A boolean value that represents whether new Droplets can be created in this region.

features = None

A set of features available in this region.

id = None

The provider-assigned unique ID for this managed resource.

name = None

The display name of the region.

sizes = None

A set of identifying slugs for the Droplet sizes available in this region.

slug = None

A human-readable string that is used as a unique identifier for each region.

class pulumi_digitalocean.GetRegionsResult(filters=None, id=None, regions=None, sorts=None)

A collection of values returned by getRegions.

id = None

The provider-assigned unique ID for this managed resource.

regions = None

A set of regions satisfying any filter and sort criteria. Each region has the following attributes:

  • slug - A human-readable string that is used as a unique identifier for each region.

  • name - The display name of the region.

  • available - A boolean value that represents whether new Droplets can be created in this region.

  • sizes - A set of identifying slugs for the Droplet sizes available in this region.

  • features - A set of features available in this region.

class pulumi_digitalocean.GetSizesResult(filters=None, id=None, sizes=None, sorts=None)

A collection of values returned by getSizes.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetSpacesBucketObjectResult(body=None, bucket=None, cache_control=None, content_disposition=None, content_encoding=None, content_language=None, content_length=None, content_type=None, etag=None, expiration=None, expires=None, id=None, key=None, last_modified=None, metadata=None, range=None, region=None, version_id=None, website_redirect_location=None)

A collection of values returned by getSpacesBucketObject.

body = None

Object data (see limitations above to understand cases in which this field is actually available)

cache_control = None

Specifies caching behavior along the request/reply chain.

content_disposition = None

Specifies presentational information for the object.

content_encoding = None

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.

content_language = None

The language the content is in.

content_length = None

Size of the body in bytes.

content_type = None

A standard MIME type describing the format of the object data.

etag = None

ETag generated for the object (an MD5 sum of the object content in case it’s not encrypted)

expiration = None

If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.

expires = None

The date and time at which the object is no longer cacheable.

id = None

The provider-assigned unique ID for this managed resource.

last_modified = None

Last modified date of the object in RFC1123 format (e.g. Mon, 02 Jan 2006 15:04:05 MST)

metadata = None

A map of metadata stored with the object in Spaces

version_id = None

The latest version ID of the object returned.

website_redirect_location = None

If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Spaces stores the value of this header in the object metadata.

class pulumi_digitalocean.GetSpacesBucketObjectsResult(bucket=None, common_prefixes=None, delimiter=None, encoding_type=None, id=None, keys=None, max_keys=None, owners=None, prefix=None, region=None)

A collection of values returned by getSpacesBucketObjects.

common_prefixes = None

List of any keys between prefix and the next occurrence of delimiter (i.e., similar to subdirectories of the prefix “directory”); the list is only returned when you specify delimiter

id = None

The provider-assigned unique ID for this managed resource.

keys = None

List of strings representing object keys

owners = None

List of strings representing object owner IDs

class pulumi_digitalocean.GetSpacesBucketResult(bucket_domain_name=None, id=None, name=None, region=None, urn=None)

A collection of values returned by getSpacesBucket.

bucket_domain_name = None

The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)

id = None

The provider-assigned unique ID for this managed resource.

name = None

The name of the Spaces bucket

region = None

The slug of the region where the bucket is stored.

urn = None

The uniform resource name of the bucket

class pulumi_digitalocean.GetSpacesBucketsResult(buckets=None, filters=None, id=None, sorts=None)

A collection of values returned by getSpacesBuckets.

buckets = None

A list of Spaces buckets satisfying any filter and sort criteria. Each bucket has the following attributes:

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetSshKeyResult(fingerprint=None, id=None, name=None, public_key=None)

A collection of values returned by getSshKey.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetTagResult(databases_count=None, droplets_count=None, id=None, images_count=None, name=None, total_resource_count=None, volume_snapshots_count=None, volumes_count=None)

A collection of values returned by getTag.

databases_count = None

A count of the database clusters that the tag is applied to.

droplets_count = None

A count of the Droplets the tag is applied to.

id = None

The provider-assigned unique ID for this managed resource.

images_count = None

A count of the images that the tag is applied to.

total_resource_count = None

A count of the total number of resources that the tag is applied to.

volume_snapshots_count = None

A count of the volume snapshots that the tag is applied to.

volumes_count = None

A count of the volumes that the tag is applied to.

class pulumi_digitalocean.GetTagsResult(filters=None, id=None, sorts=None, tags=None)

A collection of values returned by getTags.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_digitalocean.GetVolumeResult(description=None, droplet_ids=None, filesystem_label=None, filesystem_type=None, id=None, name=None, region=None, size=None, tags=None, urn=None)

A collection of values returned by getVolume.

description = None

Text describing a block storage volume.

droplet_ids = None

A list of associated Droplet ids.

filesystem_label = None

Filesystem label currently in-use on the block storage volume.

filesystem_type = None

Filesystem type currently in-use on the block storage volume.

id = None

The provider-assigned unique ID for this managed resource.

size = None

The size of the block storage volume in GiB.

tags = None

A list of the tags associated to the Volume.

class pulumi_digitalocean.GetVolumeSnapshotResult(created_at=None, id=None, min_disk_size=None, most_recent=None, name=None, name_regex=None, region=None, regions=None, size=None, tags=None, volume_id=None)

A collection of values returned by getVolumeSnapshot.

created_at = None

The date and time the volume snapshot was created.

id = None

The provider-assigned unique ID for this managed resource.

min_disk_size = None

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

regions = None

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

size = None

The billable size of the volume snapshot in gigabytes.

tags = None

A list of the tags associated to the volume snapshot.

volume_id = None

The ID of the volume from which the volume snapshot originated.

class pulumi_digitalocean.GetVpcResult(created_at=None, default=None, description=None, id=None, ip_range=None, name=None, region=None, urn=None)

A collection of values returned by getVpc.

created_at = None

The date and time of when the VPC was created.

default = None

A boolean indicating whether or not the VPC is the default one for the region.

description = None

A free-form text field describing the VPC.

id = None

The unique identifier for the VPC.

ip_range = None

The range of IP addresses for the VPC in CIDR notation.

name = None

The name of the VPC.

region = None

The DigitalOcean region slug for the VPC’s location.

urn = None

The uniform resource name (URN) for the VPC.

class pulumi_digitalocean.KubernetesCluster(resource_name, opts=None, name=None, node_pool=None, region=None, tags=None, version=None, vpc_uuid=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Kubernetes cluster resource. This can be used to create, delete, and modify clusters. For more information see the official documentation.

import pulumi
import pulumi_digitalocean as digitalocean

foo = digitalocean.KubernetesCluster("foo",
    node_pool={
        "name": "worker-pool",
        "node_count": 3,
        "size": "s-2vcpu-2gb",
    },
    region="nyc1",
    version="1.15.5-do.1")
import pulumi
import pulumi_digitalocean as digitalocean

foo = digitalocean.KubernetesCluster("foo",
    node_pool={
        "auto_scale": True,
        "max_nodes": 5,
        "min_nodes": 1,
        "name": "autoscale-worker-pool",
        "size": "s-2vcpu-2gb",
    },
    region="nyc1",
    version="1.15.5-do.1")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – A name for the Kubernetes cluster.

  • node_pool (pulumi.Input[dict]) – A block representing the cluster’s default node pool. Additional node pools may be added to the cluster using the .KubernetesNodePool resource. The following arguments may be specified:

- `name` - (Required) A name for the node pool.
- `size` - (Required) The slug identifier for the type of Droplet to be used as workers in the node pool.
- `node_count` - (Optional) The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
- `auto_scale` - (Optional) Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
- `min_nodes` - (Optional) If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
- `max_nodes` - (Optional) If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
- `tags` - (Optional) A list of tag names to be applied to the Kubernetes cluster.
- `labels` - (Optional) A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
Parameters
  • region (pulumi.Input[str]) – The slug identifier for the region where the Kubernetes cluster will be created.

  • tags (pulumi.Input[list]) – A list of tag names to be applied to the Kubernetes cluster.

  • version (pulumi.Input[str]) – The slug identifier for the version of Kubernetes used for the cluster. Use doctl to find the available versions doctl kubernetes options versions. (Note: A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.)

  • vpc_uuid (pulumi.Input[str]) – The ID of the VPC where the Kubernetes cluster will be located.

The node_pool object supports the following:

  • actual_node_count (pulumi.Input[float])

  • auto_scale (pulumi.Input[bool])

  • id (pulumi.Input[str]) - A unique ID that can be used to identify and reference a Kubernetes cluster.

  • labels (pulumi.Input[dict])

  • max_nodes (pulumi.Input[float])

  • min_nodes (pulumi.Input[float])

  • name (pulumi.Input[str]) - A name for the Kubernetes cluster.

  • node_count (pulumi.Input[float])

  • nodes (pulumi.Input[list])

    • created_at (pulumi.Input[str]) - The date and time when the Kubernetes cluster was created.

    • droplet_id (pulumi.Input[str])

    • id (pulumi.Input[str]) - A unique ID that can be used to identify and reference a Kubernetes cluster.

    • name (pulumi.Input[str]) - A name for the Kubernetes cluster.

    • status (pulumi.Input[str]) - A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

    • updated_at (pulumi.Input[str]) - The date and time when the Kubernetes cluster was last updated.

      • kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes:

      • raw_config - The full contents of the Kubernetes cluster’s kubeconfig file.

      • host - The URL of the API server on the Kubernetes master node.

      • cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority.

      • token - The DigitalOcean API access token used by clients to access the cluster.

      • client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

      • client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

      • expires_at - The date and time when the credentials will expire and need to be regenerated.

  • size (pulumi.Input[str])

  • tags (pulumi.Input[list]) - A list of tag names to be applied to the Kubernetes cluster.

cluster_subnet: pulumi.Output[str] = None

The range of IP addresses in the overlay network of the Kubernetes cluster.

created_at: pulumi.Output[str] = None

The date and time when the Kubernetes cluster was created.

endpoint: pulumi.Output[str] = None

The base URL of the API server on the Kubernetes master node.

ipv4_address: pulumi.Output[str] = None

The public IPv4 address of the Kubernetes master node.

name: pulumi.Output[str] = None

A name for the Kubernetes cluster.

node_pool: pulumi.Output[dict] = None

A block representing the cluster’s default node pool. Additional node pools may be added to the cluster using the .KubernetesNodePool resource. The following arguments may be specified:

  • name - (Required) A name for the node pool.

  • size - (Required) The slug identifier for the type of Droplet to be used as workers in the node pool.

  • node_count - (Optional) The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

  • auto_scale - (Optional) Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

  • min_nodes - (Optional) If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

  • max_nodes - (Optional) If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

  • tags - (Optional) A list of tag names to be applied to the Kubernetes cluster.

  • labels - (Optional) A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

    • actual_node_count (float)

    • auto_scale (bool)

    • id (str) - A unique ID that can be used to identify and reference a Kubernetes cluster.

    • labels (dict)

    • max_nodes (float)

    • min_nodes (float)

    • name (str) - A name for the Kubernetes cluster.

    • node_count (float)

    • nodes (list)

      • created_at (str) - The date and time when the Kubernetes cluster was created.

      • droplet_id (str)

      • id (str) - A unique ID that can be used to identify and reference a Kubernetes cluster.

      • name (str) - A name for the Kubernetes cluster.

      • status (str) - A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

      • updated_at (str) - The date and time when the Kubernetes cluster was last updated.

        • kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes:

        • raw_config - The full contents of the Kubernetes cluster’s kubeconfig file.

        • host - The URL of the API server on the Kubernetes master node.

        • cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority.

        • token - The DigitalOcean API access token used by clients to access the cluster.

        • client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

        • client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

        • expires_at - The date and time when the credentials will expire and need to be regenerated.

    • size (str)

    • tags (list) - A list of tag names to be applied to the Kubernetes cluster.

region: pulumi.Output[str] = None

The slug identifier for the region where the Kubernetes cluster will be created.

service_subnet: pulumi.Output[str] = None

The range of assignable IP addresses for services running in the Kubernetes cluster.

status: pulumi.Output[str] = None

A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

tags: pulumi.Output[list] = None

A list of tag names to be applied to the Kubernetes cluster.

updated_at: pulumi.Output[str] = None

The date and time when the Kubernetes cluster was last updated.

  • kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes:

  • raw_config - The full contents of the Kubernetes cluster’s kubeconfig file.

  • host - The URL of the API server on the Kubernetes master node.

  • cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority.

  • token - The DigitalOcean API access token used by clients to access the cluster.

  • client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

  • client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

  • expires_at - The date and time when the credentials will expire and need to be regenerated.

version: pulumi.Output[str] = None

The slug identifier for the version of Kubernetes used for the cluster. Use doctl to find the available versions doctl kubernetes options versions. (Note: A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.)

vpc_uuid: pulumi.Output[str] = None

The ID of the VPC where the Kubernetes cluster will be located.

static get(resource_name, id, opts=None, cluster_subnet=None, created_at=None, endpoint=None, ipv4_address=None, kube_configs=None, name=None, node_pool=None, region=None, service_subnet=None, status=None, tags=None, updated_at=None, version=None, vpc_uuid=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cluster_subnet (pulumi.Input[str]) – The range of IP addresses in the overlay network of the Kubernetes cluster.

  • created_at (pulumi.Input[str]) – The date and time when the Kubernetes cluster was created.

  • endpoint (pulumi.Input[str]) – The base URL of the API server on the Kubernetes master node.

  • ipv4_address (pulumi.Input[str]) – The public IPv4 address of the Kubernetes master node.

  • name (pulumi.Input[str]) – A name for the Kubernetes cluster.

  • node_pool (pulumi.Input[dict]) – A block representing the cluster’s default node pool. Additional node pools may be added to the cluster using the .KubernetesNodePool resource. The following arguments may be specified:

- `name` - (Required) A name for the node pool.
- `size` - (Required) The slug identifier for the type of Droplet to be used as workers in the node pool.
- `node_count` - (Optional) The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
- `auto_scale` - (Optional) Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
- `min_nodes` - (Optional) If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
- `max_nodes` - (Optional) If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
- `tags` - (Optional) A list of tag names to be applied to the Kubernetes cluster.
- `labels` - (Optional) A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
Parameters
  • region (pulumi.Input[str]) – The slug identifier for the region where the Kubernetes cluster will be created.

  • service_subnet (pulumi.Input[str]) – The range of assignable IP addresses for services running in the Kubernetes cluster.

  • status (pulumi.Input[str]) – A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

  • tags (pulumi.Input[list]) – A list of tag names to be applied to the Kubernetes cluster.

  • updated_at (pulumi.Input[str]) – The date and time when the Kubernetes cluster was last updated.

* `kube_config.0` - A representation of the Kubernetes cluster's kubeconfig with the following attributes:
- `raw_config` - The full contents of the Kubernetes cluster's kubeconfig file.
- `host` - The URL of the API server on the Kubernetes master node.
- `cluster_ca_certificate` - The base64 encoded public certificate for the cluster's certificate authority.
- `token` - The DigitalOcean API access token used by clients to access the cluster.
- `client_key` - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster.
- `client_certificate` - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster.
- `expires_at` - The date and time when the credentials will expire and need to be regenerated.
Parameters
  • version (pulumi.Input[str]) –

    The slug identifier for the version of Kubernetes used for the cluster. Use doctl to find the available versions doctl kubernetes options versions. (Note: A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.)

  • vpc_uuid (pulumi.Input[str]) – The ID of the VPC where the Kubernetes cluster will be located.

The kube_configs object supports the following:

  • clientCertificate (pulumi.Input[str])

  • clientKey (pulumi.Input[str])

  • clusterCaCertificate (pulumi.Input[str])

  • expiresAt (pulumi.Input[str])

  • host (pulumi.Input[str])

  • rawConfig (pulumi.Input[str])

  • token (pulumi.Input[str])

The node_pool object supports the following:

  • actual_node_count (pulumi.Input[float])

  • auto_scale (pulumi.Input[bool])

  • id (pulumi.Input[str]) - A unique ID that can be used to identify and reference a Kubernetes cluster.

  • labels (pulumi.Input[dict])

  • max_nodes (pulumi.Input[float])

  • min_nodes (pulumi.Input[float])

  • name (pulumi.Input[str]) - A name for the Kubernetes cluster.

  • node_count (pulumi.Input[float])

  • nodes (pulumi.Input[list])

    • created_at (pulumi.Input[str]) - The date and time when the Kubernetes cluster was created.

    • droplet_id (pulumi.Input[str])

    • id (pulumi.Input[str]) - A unique ID that can be used to identify and reference a Kubernetes cluster.

    • name (pulumi.Input[str]) - A name for the Kubernetes cluster.

    • status (pulumi.Input[str]) - A string indicating the current status of the cluster. Potential values include running, provisioning, and errored.

    • updated_at (pulumi.Input[str]) - The date and time when the Kubernetes cluster was last updated.

      • kube_config.0 - A representation of the Kubernetes cluster’s kubeconfig with the following attributes:

      • raw_config - The full contents of the Kubernetes cluster’s kubeconfig file.

      • host - The URL of the API server on the Kubernetes master node.

      • cluster_ca_certificate - The base64 encoded public certificate for the cluster’s certificate authority.

      • token - The DigitalOcean API access token used by clients to access the cluster.

      • client_key - The base64 encoded private key used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

      • client_certificate - The base64 encoded public certificate used by clients to access the cluster. Only available if token authentication is not supported on your cluster.

      • expires_at - The date and time when the credentials will expire and need to be regenerated.

  • size (pulumi.Input[str])

  • tags (pulumi.Input[list]) - A list of tag names to be applied to the Kubernetes cluster.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.KubernetesNodePool(resource_name, opts=None, auto_scale=None, cluster_id=None, labels=None, max_nodes=None, min_nodes=None, name=None, node_count=None, size=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Kubernetes node pool resource. While the default node pool must be defined in the .KubernetesCluster resource, this resource can be used to add additional ones to a cluster.

import pulumi
import pulumi_digitalocean as digitalocean

foo = digitalocean.KubernetesCluster("foo",
    region="nyc1",
    version="1.15.5-do.1",
    node_pool={
        "name": "front-end-pool",
        "size": "s-2vcpu-2gb",
        "node_count": 3,
    })
bar = digitalocean.KubernetesNodePool("bar",
    cluster_id=foo.id,
    size="c-2",
    node_count=2,
    tags=["backend"],
    labels={
        "service": "backend",
        "priority": "high",
    })
import pulumi
import pulumi_digitalocean as digitalocean

autoscale_pool_01 = digitalocean.KubernetesNodePool("autoscale-pool-01",
    cluster_id=digitalocean_kubernetes_cluster["foo"]["id"],
    size="s-1vcpu-2gb",
    auto_scale=True,
    min_nodes=0,
    max_nodes=5)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • auto_scale (pulumi.Input[bool]) – Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

  • cluster_id (pulumi.Input[str]) – The ID of the Kubernetes cluster to which the node pool is associated.

  • labels (pulumi.Input[dict]) –

    A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

  • max_nodes (pulumi.Input[float]) – If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

  • min_nodes (pulumi.Input[float]) – If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

  • name (pulumi.Input[str]) – A name for the node pool.

  • node_count (pulumi.Input[float]) – The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

  • size (pulumi.Input[str]) – The slug identifier for the type of Droplet to be used as workers in the node pool.

  • tags (pulumi.Input[list]) – A list of tag names to be applied to the Kubernetes cluster.

actual_node_count: pulumi.Output[float] = None

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

auto_scale: pulumi.Output[bool] = None

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

cluster_id: pulumi.Output[str] = None

The ID of the Kubernetes cluster to which the node pool is associated.

labels: pulumi.Output[dict] = None

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

max_nodes: pulumi.Output[float] = None

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

min_nodes: pulumi.Output[float] = None

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

name: pulumi.Output[str] = None

A name for the node pool.

node_count: pulumi.Output[float] = None

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

nodes: pulumi.Output[list] = None

A list of nodes in the pool. Each node exports the following attributes:

  • id - A unique ID that can be used to identify and reference the node.

  • name - The auto-generated name for the node.

  • status - A string indicating the current status of the individual node.

  • droplet_id - The id of the node’s droplet

  • created_at - The date and time when the node was created.

  • updated_at - The date and time when the node was last updated.

    • created_at (str)

    • droplet_id (str)

    • id (str) - A unique ID that can be used to identify and reference the node pool.

    • name (str) - A name for the node pool.

    • status (str)

    • updated_at (str)

size: pulumi.Output[str] = None

The slug identifier for the type of Droplet to be used as workers in the node pool.

tags: pulumi.Output[list] = None

A list of tag names to be applied to the Kubernetes cluster.

static get(resource_name, id, opts=None, actual_node_count=None, auto_scale=None, cluster_id=None, labels=None, max_nodes=None, min_nodes=None, name=None, node_count=None, nodes=None, size=None, tags=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • actual_node_count (pulumi.Input[float]) – A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

  • auto_scale (pulumi.Input[bool]) – Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

  • cluster_id (pulumi.Input[str]) – The ID of the Kubernetes cluster to which the node pool is associated.

  • labels (pulumi.Input[dict]) –

    A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

  • max_nodes (pulumi.Input[float]) – If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

  • min_nodes (pulumi.Input[float]) – If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

  • name (pulumi.Input[str]) – A name for the node pool.

  • node_count (pulumi.Input[float]) – The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

  • nodes (pulumi.Input[list]) – A list of nodes in the pool. Each node exports the following attributes:

- `id` -  A unique ID that can be used to identify and reference the node.
- `name` - The auto-generated name for the node.
- `status` -  A string indicating the current status of the individual node.
- `droplet_id` - The id of the node's droplet
- `created_at` - The date and time when the node was created.
- `updated_at` - The date and time when the node was last updated.
Parameters
  • size (pulumi.Input[str]) – The slug identifier for the type of Droplet to be used as workers in the node pool.

  • tags (pulumi.Input[list]) – A list of tag names to be applied to the Kubernetes cluster.

The nodes object supports the following:

  • created_at (pulumi.Input[str])

  • droplet_id (pulumi.Input[str])

  • id (pulumi.Input[str]) - A unique ID that can be used to identify and reference the node pool.

  • name (pulumi.Input[str]) - A name for the node pool.

  • status (pulumi.Input[str])

  • updated_at (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.LoadBalancer(resource_name, opts=None, algorithm=None, droplet_ids=None, droplet_tag=None, enable_backend_keepalive=None, enable_proxy_protocol=None, forwarding_rules=None, healthcheck=None, name=None, redirect_http_to_https=None, region=None, sticky_sessions=None, vpc_uuid=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Load Balancer resource. This can be used to create, modify, and delete Load Balancers.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • algorithm (pulumi.Input[str]) – The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

  • droplet_ids (pulumi.Input[list]) – A list of the IDs of each droplet to be attached to the Load Balancer.

  • droplet_tag (pulumi.Input[str]) – The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

  • enable_backend_keepalive (pulumi.Input[bool]) – A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

  • enable_proxy_protocol (pulumi.Input[bool]) – A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

  • forwarding_rules (pulumi.Input[list]) – A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

  • healthcheck (pulumi.Input[dict]) – A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

  • name (pulumi.Input[str]) – The Load Balancer name

  • redirect_http_to_https (pulumi.Input[bool]) – A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

  • region (pulumi.Input[str]) – The region to start in

  • sticky_sessions (pulumi.Input[dict]) – A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

  • vpc_uuid (pulumi.Input[str]) – The ID of the VPC where the load balancer will be located.

The forwarding_rules object supports the following:

  • certificate_id (pulumi.Input[str]) - The ID of the TLS certificate to be used for SSL termination.

  • entryPort (pulumi.Input[float]) - An integer representing the port on which the Load Balancer instance will listen.

  • entryProtocol (pulumi.Input[str]) - The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2 or tcp.

  • targetPort (pulumi.Input[float]) - An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

  • targetProtocol (pulumi.Input[str]) - The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2 or tcp.

  • tlsPassthrough (pulumi.Input[bool]) - A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

The healthcheck object supports the following:

  • checkIntervalSeconds (pulumi.Input[float]) - The number of seconds between between two consecutive health checks. If not specified, the default value is 10.

  • healthyThreshold (pulumi.Input[float]) - The number of times a health check must pass for a backend Droplet to be marked “healthy” and be re-added to the pool. If not specified, the default value is 5.

  • path (pulumi.Input[str]) - The path on the backend Droplets to which the Load Balancer instance will send a request.

  • port (pulumi.Input[float]) - An integer representing the port on the backend Droplets on which the health check will attempt a connection.

  • protocol (pulumi.Input[str]) - The protocol used for health checks sent to the backend Droplets. The possible values are http or tcp.

  • responseTimeoutSeconds (pulumi.Input[float]) - The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

  • unhealthyThreshold (pulumi.Input[float]) - The number of times a health check must fail for a backend Droplet to be marked “unhealthy” and be removed from the pool. If not specified, the default value is 3.

The sticky_sessions object supports the following:

  • cookieName (pulumi.Input[str]) - The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

  • cookieTtlSeconds (pulumi.Input[float]) - The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

  • type (pulumi.Input[str]) - An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

algorithm: pulumi.Output[str] = None

The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

droplet_ids: pulumi.Output[list] = None

A list of the IDs of each droplet to be attached to the Load Balancer.

droplet_tag: pulumi.Output[str] = None

The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

enable_backend_keepalive: pulumi.Output[bool] = None

A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

enable_proxy_protocol: pulumi.Output[bool] = None

A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

forwarding_rules: pulumi.Output[list] = None

A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

  • certificate_id (str) - The ID of the TLS certificate to be used for SSL termination.

  • entryPort (float) - An integer representing the port on which the Load Balancer instance will listen.

  • entryProtocol (str) - The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2 or tcp.

  • targetPort (float) - An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

  • targetProtocol (str) - The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2 or tcp.

  • tlsPassthrough (bool) - A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

healthcheck: pulumi.Output[dict] = None

A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

  • checkIntervalSeconds (float) - The number of seconds between between two consecutive health checks. If not specified, the default value is 10.

  • healthyThreshold (float) - The number of times a health check must pass for a backend Droplet to be marked “healthy” and be re-added to the pool. If not specified, the default value is 5.

  • path (str) - The path on the backend Droplets to which the Load Balancer instance will send a request.

  • port (float) - An integer representing the port on the backend Droplets on which the health check will attempt a connection.

  • protocol (str) - The protocol used for health checks sent to the backend Droplets. The possible values are http or tcp.

  • responseTimeoutSeconds (float) - The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

  • unhealthyThreshold (float) - The number of times a health check must fail for a backend Droplet to be marked “unhealthy” and be removed from the pool. If not specified, the default value is 3.

load_balancer_urn: pulumi.Output[str] = None

The uniform resource name for the Load Balancer

name: pulumi.Output[str] = None

The Load Balancer name

redirect_http_to_https: pulumi.Output[bool] = None

A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

region: pulumi.Output[str] = None

The region to start in

sticky_sessions: pulumi.Output[dict] = None

A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

  • cookieName (str) - The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

  • cookieTtlSeconds (float) - The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

  • type (str) - An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

vpc_uuid: pulumi.Output[str] = None

The ID of the VPC where the load balancer will be located.

static get(resource_name, id, opts=None, algorithm=None, droplet_ids=None, droplet_tag=None, enable_backend_keepalive=None, enable_proxy_protocol=None, forwarding_rules=None, healthcheck=None, ip=None, load_balancer_urn=None, name=None, redirect_http_to_https=None, region=None, status=None, sticky_sessions=None, vpc_uuid=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • algorithm (pulumi.Input[str]) – The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

  • droplet_ids (pulumi.Input[list]) – A list of the IDs of each droplet to be attached to the Load Balancer.

  • droplet_tag (pulumi.Input[str]) – The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

  • enable_backend_keepalive (pulumi.Input[bool]) – A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

  • enable_proxy_protocol (pulumi.Input[bool]) – A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

  • forwarding_rules (pulumi.Input[list]) – A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

  • healthcheck (pulumi.Input[dict]) – A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

  • load_balancer_urn (pulumi.Input[str]) – The uniform resource name for the Load Balancer

  • name (pulumi.Input[str]) – The Load Balancer name

  • redirect_http_to_https (pulumi.Input[bool]) – A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

  • region (pulumi.Input[str]) – The region to start in

  • sticky_sessions (pulumi.Input[dict]) – A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

  • vpc_uuid (pulumi.Input[str]) – The ID of the VPC where the load balancer will be located.

The forwarding_rules object supports the following:

  • certificate_id (pulumi.Input[str]) - The ID of the TLS certificate to be used for SSL termination.

  • entryPort (pulumi.Input[float]) - An integer representing the port on which the Load Balancer instance will listen.

  • entryProtocol (pulumi.Input[str]) - The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2 or tcp.

  • targetPort (pulumi.Input[float]) - An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

  • targetProtocol (pulumi.Input[str]) - The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2 or tcp.

  • tlsPassthrough (pulumi.Input[bool]) - A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

The healthcheck object supports the following:

  • checkIntervalSeconds (pulumi.Input[float]) - The number of seconds between between two consecutive health checks. If not specified, the default value is 10.

  • healthyThreshold (pulumi.Input[float]) - The number of times a health check must pass for a backend Droplet to be marked “healthy” and be re-added to the pool. If not specified, the default value is 5.

  • path (pulumi.Input[str]) - The path on the backend Droplets to which the Load Balancer instance will send a request.

  • port (pulumi.Input[float]) - An integer representing the port on the backend Droplets on which the health check will attempt a connection.

  • protocol (pulumi.Input[str]) - The protocol used for health checks sent to the backend Droplets. The possible values are http or tcp.

  • responseTimeoutSeconds (pulumi.Input[float]) - The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

  • unhealthyThreshold (pulumi.Input[float]) - The number of times a health check must fail for a backend Droplet to be marked “unhealthy” and be removed from the pool. If not specified, the default value is 3.

The sticky_sessions object supports the following:

  • cookieName (pulumi.Input[str]) - The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

  • cookieTtlSeconds (pulumi.Input[float]) - The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

  • type (pulumi.Input[str]) - An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Project(resource_name, opts=None, description=None, environment=None, name=None, purpose=None, resources=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Project resource.

Projects allow you to organize your resources into groups that fit the way you work. You can group resources (like Droplets, Spaces, Load Balancers, domains, and Floating IPs) in ways that align with the applications you host on DigitalOcean.

The following resource types can be associated with a project:

  • Database Clusters

  • Domains

  • Droplets

  • Floating IP

  • Load Balancers

  • Spaces Bucket

  • Volume

Note: A managed project cannot be set as a default project.

import pulumi
import pulumi_digitalocean as digitalocean

playground = digitalocean.Project("playground",
    description="A project to represent development resources.",
    environment="Development",
    purpose="Web Application")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – the description of the project

  • environment (pulumi.Input[str]) – the environment of the project’s resources. The possible values are: Development, Staging, Production)

  • name (pulumi.Input[str]) – The name of the Project

  • purpose (pulumi.Input[str]) – the purpose of the project, (Default: “Web Application”)

  • resources (pulumi.Input[list]) – a list of uniform resource names (URNs) for the resources associated with the project

created_at: pulumi.Output[str] = None

the date and time when the project was created, (ISO8601)

description: pulumi.Output[str] = None

the description of the project

environment: pulumi.Output[str] = None

the environment of the project’s resources. The possible values are: Development, Staging, Production)

name: pulumi.Output[str] = None

The name of the Project

owner_id: pulumi.Output[float] = None

the id of the project owner.

owner_uuid: pulumi.Output[str] = None

the unique universal identifier of the project owner.

purpose: pulumi.Output[str] = None

the purpose of the project, (Default: “Web Application”)

resources: pulumi.Output[list] = None

a list of uniform resource names (URNs) for the resources associated with the project

updated_at: pulumi.Output[str] = None

the date and time when the project was last updated, (ISO8601)

static get(resource_name, id, opts=None, created_at=None, description=None, environment=None, is_default=None, name=None, owner_id=None, owner_uuid=None, purpose=None, resources=None, updated_at=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • created_at (pulumi.Input[str]) – the date and time when the project was created, (ISO8601)

  • description (pulumi.Input[str]) – the description of the project

  • environment (pulumi.Input[str]) – the environment of the project’s resources. The possible values are: Development, Staging, Production)

  • name (pulumi.Input[str]) – The name of the Project

  • owner_id (pulumi.Input[float]) – the id of the project owner.

  • owner_uuid (pulumi.Input[str]) – the unique universal identifier of the project owner.

  • purpose (pulumi.Input[str]) – the purpose of the project, (Default: “Web Application”)

  • resources (pulumi.Input[list]) – a list of uniform resource names (URNs) for the resources associated with the project

  • updated_at (pulumi.Input[str]) – the date and time when the project was last updated, (ISO8601)

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.ProjectResources(resource_name, opts=None, project=None, resources=None, __props__=None, __name__=None, __opts__=None)

Assign resources to a DigitalOcean Project. This is useful if you need to assign resources managed this provider to a DigitalOcean Project that is unmanaged by the provider.

The following resource types can be associated with a project:

  • Database Clusters

  • Domains

  • Droplets

  • Floating IP

  • Load Balancers

  • Spaces Bucket

  • Volume

import pulumi
import pulumi_digitalocean as digitalocean

playground = digitalocean.get_project(name="playground")
foobar = digitalocean.Droplet("foobar",
    size="512mb",
    image="centos-7-x64",
    region="nyc3")
barfoo = digitalocean.ProjectResources("barfoo",
    project=data[".Project"]["foo"]["id"],
    resources=[foobar.droplet_urn])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • project (pulumi.Input[str]) – the ID of the project

  • resources (pulumi.Input[list]) – a list of uniform resource names (URNs) for the resources associated with the project

project: pulumi.Output[str] = None

the ID of the project

resources: pulumi.Output[list] = None

a list of uniform resource names (URNs) for the resources associated with the project

static get(resource_name, id, opts=None, project=None, resources=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • project (pulumi.Input[str]) – the ID of the project

  • resources (pulumi.Input[list]) – a list of uniform resource names (URNs) for the resources associated with the project

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Provider(resource_name, opts=None, api_endpoint=None, spaces_access_id=None, spaces_endpoint=None, spaces_secret_key=None, token=None, __props__=None, __name__=None, __opts__=None)

The provider type for the digitalocean package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • api_endpoint (pulumi.Input[str]) – The URL to use for the DigitalOcean API.

  • spaces_access_id (pulumi.Input[str]) – The access key ID for Spaces API operations.

  • spaces_endpoint (pulumi.Input[str]) – The URL to use for the DigitalOcean Spaces API.

  • spaces_secret_key (pulumi.Input[str]) – The secret access key for Spaces API operations.

  • token (pulumi.Input[str]) – The token key for API operations.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.SpacesBucket(resource_name, opts=None, acl=None, cors_rules=None, force_destroy=None, lifecycle_rules=None, name=None, region=None, versioning=None, __props__=None, __name__=None, __opts__=None)

Provides a bucket resource for Spaces, DigitalOcean’s object storage product.

The Spaces API was designed to be interoperable with Amazon’s AWS S3 API. This allows users to interact with the service while using the tools they already know. Spaces mirrors S3’s authentication framework and requests to Spaces require a key pair similar to Amazon’s Access ID and Secret Key.

The authentication requirement can be met by either setting the SPACES_ACCESS_KEY_ID and SPACES_SECRET_ACCESS_KEY environment variables or the provider’s spaces_access_id and spaces_secret_key arguments to the access ID and secret you generate via the DigitalOcean control panel. For example:

import pulumi
import pulumi_digitalocean as digitalocean

static_assets = digitalocean.SpacesBucket("static-assets")

For more information, See An Introduction to DigitalOcean Spaces

import pulumi
import pulumi_digitalocean as digitalocean

foobar = digitalocean.SpacesBucket("foobar", region="nyc3")
import pulumi
import pulumi_digitalocean as digitalocean

foobar = digitalocean.SpacesBucket("foobar",
    cors_rules=[
        {
            "allowedHeaders": ["*"],
            "allowedMethods": ["GET"],
            "allowedOrigins": ["*"],
            "maxAgeSeconds": 3000,
        },
        {
            "allowedHeaders": ["*"],
            "allowedMethods": [
                "PUT",
                "POST",
                "DELETE",
            ],
            "allowedOrigins": ["https://www.example.com"],
            "maxAgeSeconds": 3000,
        },
    ],
    region="nyc3")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • acl (pulumi.Input[str]) – Canned ACL applied on bucket creation (private or public-read)

  • cors_rules (pulumi.Input[list]) – A rule of Cross-Origin Resource Sharing (documented below).

  • force_destroy (pulumi.Input[bool]) – Unless true, the bucket will only be destroyed if empty (Defaults to false)

  • lifecycle_rules (pulumi.Input[list]) – A configuration of object lifecycle management (documented below).

  • name (pulumi.Input[str]) – The name of the bucket

  • region (pulumi.Input[str]) – The region where the bucket resides (Defaults to nyc3)

  • versioning (pulumi.Input[dict]) – A state of versioning (documented below)

The cors_rules object supports the following:

  • allowedHeaders (pulumi.Input[list]) - A list of headers that will be included in the CORS preflight request’s Access-Control-Request-Headers. A header may contain one wildcard (e.g. x-amz-*).

  • allowedMethods (pulumi.Input[list]) - A list of HTTP methods (e.g. GET) which are allowed from the specified origin.

  • allowedOrigins (pulumi.Input[list]) - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).

  • maxAgeSeconds (pulumi.Input[float]) - The time in seconds that browser can cache the response for a preflight request.

The lifecycle_rules object supports the following:

  • abortIncompleteMultipartUploadDays (pulumi.Input[float]) - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.

  • enabled (pulumi.Input[bool]) - Specifies lifecycle rule status.

  • expiration (pulumi.Input[dict]) - Specifies a time period after which applicable objects expire (documented below).

    • date (pulumi.Input[str]) - Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. “2020-03-22T15:03:55Z” or parts thereof e.g. “2019-02-28”.

    • days (pulumi.Input[float]) - Specifies the number of days after object creation when the applicable objects will expire.

    • expiredObjectDeleteMarker (pulumi.Input[bool]) - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.

  • id (pulumi.Input[str]) - Unique identifier for the rule.

  • noncurrentVersionExpiration (pulumi.Input[dict]) - Specifies when non-current object versions expire (documented below).

    • days (pulumi.Input[float]) - Specifies the number of days after which an object’s non-current versions expire.

  • prefix (pulumi.Input[str]) - Object key prefix identifying one or more objects to which the rule applies.

The versioning object supports the following:

  • enabled (pulumi.Input[bool]) - Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.

acl: pulumi.Output[str] = None

Canned ACL applied on bucket creation (private or public-read)

bucket_domain_name: pulumi.Output[str] = None

The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)

bucket_urn: pulumi.Output[str] = None

The uniform resource name for the bucket

cors_rules: pulumi.Output[list] = None

A rule of Cross-Origin Resource Sharing (documented below).

  • allowedHeaders (list) - A list of headers that will be included in the CORS preflight request’s Access-Control-Request-Headers. A header may contain one wildcard (e.g. x-amz-*).

  • allowedMethods (list) - A list of HTTP methods (e.g. GET) which are allowed from the specified origin.

  • allowedOrigins (list) - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).

  • maxAgeSeconds (float) - The time in seconds that browser can cache the response for a preflight request.

force_destroy: pulumi.Output[bool] = None

Unless true, the bucket will only be destroyed if empty (Defaults to false)

lifecycle_rules: pulumi.Output[list] = None

A configuration of object lifecycle management (documented below).

  • abortIncompleteMultipartUploadDays (float) - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.

  • enabled (bool) - Specifies lifecycle rule status.

  • expiration (dict) - Specifies a time period after which applicable objects expire (documented below).

    • date (str) - Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. “2020-03-22T15:03:55Z” or parts thereof e.g. “2019-02-28”.

    • days (float) - Specifies the number of days after object creation when the applicable objects will expire.

    • expiredObjectDeleteMarker (bool) - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.

  • id (str) - Unique identifier for the rule.

  • noncurrentVersionExpiration (dict) - Specifies when non-current object versions expire (documented below).

    • days (float) - Specifies the number of days after which an object’s non-current versions expire.

  • prefix (str) - Object key prefix identifying one or more objects to which the rule applies.

name: pulumi.Output[str] = None

The name of the bucket

region: pulumi.Output[str] = None

The region where the bucket resides (Defaults to nyc3)

versioning: pulumi.Output[dict] = None

A state of versioning (documented below)

  • enabled (bool) - Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.

static get(resource_name, id, opts=None, acl=None, bucket_domain_name=None, bucket_urn=None, cors_rules=None, force_destroy=None, lifecycle_rules=None, name=None, region=None, versioning=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • acl (pulumi.Input[str]) – Canned ACL applied on bucket creation (private or public-read)

  • bucket_domain_name (pulumi.Input[str]) – The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)

  • bucket_urn (pulumi.Input[str]) – The uniform resource name for the bucket

  • cors_rules (pulumi.Input[list]) – A rule of Cross-Origin Resource Sharing (documented below).

  • force_destroy (pulumi.Input[bool]) – Unless true, the bucket will only be destroyed if empty (Defaults to false)

  • lifecycle_rules (pulumi.Input[list]) – A configuration of object lifecycle management (documented below).

  • name (pulumi.Input[str]) – The name of the bucket

  • region (pulumi.Input[str]) – The region where the bucket resides (Defaults to nyc3)

  • versioning (pulumi.Input[dict]) – A state of versioning (documented below)

The cors_rules object supports the following:

  • allowedHeaders (pulumi.Input[list]) - A list of headers that will be included in the CORS preflight request’s Access-Control-Request-Headers. A header may contain one wildcard (e.g. x-amz-*).

  • allowedMethods (pulumi.Input[list]) - A list of HTTP methods (e.g. GET) which are allowed from the specified origin.

  • allowedOrigins (pulumi.Input[list]) - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).

  • maxAgeSeconds (pulumi.Input[float]) - The time in seconds that browser can cache the response for a preflight request.

The lifecycle_rules object supports the following:

  • abortIncompleteMultipartUploadDays (pulumi.Input[float]) - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.

  • enabled (pulumi.Input[bool]) - Specifies lifecycle rule status.

  • expiration (pulumi.Input[dict]) - Specifies a time period after which applicable objects expire (documented below).

    • date (pulumi.Input[str]) - Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. “2020-03-22T15:03:55Z” or parts thereof e.g. “2019-02-28”.

    • days (pulumi.Input[float]) - Specifies the number of days after object creation when the applicable objects will expire.

    • expiredObjectDeleteMarker (pulumi.Input[bool]) - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.

  • id (pulumi.Input[str]) - Unique identifier for the rule.

  • noncurrentVersionExpiration (pulumi.Input[dict]) - Specifies when non-current object versions expire (documented below).

    • days (pulumi.Input[float]) - Specifies the number of days after which an object’s non-current versions expire.

  • prefix (pulumi.Input[str]) - Object key prefix identifying one or more objects to which the rule applies.

The versioning object supports the following:

  • enabled (pulumi.Input[bool]) - Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.SpacesBucketObject(resource_name, opts=None, acl=None, bucket=None, cache_control=None, content=None, content_base64=None, content_disposition=None, content_encoding=None, content_language=None, content_type=None, etag=None, force_destroy=None, key=None, metadata=None, region=None, source=None, website_redirect=None, __props__=None, __name__=None, __opts__=None)

Provides a bucket object resource for Spaces, DigitalOcean’s object storage product. The .SpacesBucketObject resource allows this provider to upload content to Spaces.

The Spaces API was designed to be interoperable with Amazon’s AWS S3 API. This allows users to interact with the service while using the tools they already know. Spaces mirrors S3’s authentication framework and requests to Spaces require a key pair similar to Amazon’s Access ID and Secret Key.

The authentication requirement can be met by either setting the SPACES_ACCESS_KEY_ID and SPACES_SECRET_ACCESS_KEY environment variables or the provider’s spaces_access_id and spaces_secret_key arguments to the access ID and secret you generate via the DigitalOcean control panel. For example:

import pulumi
import pulumi_digitalocean as digitalocean

static_assets = digitalocean.SpacesBucket("static-assets")

For more information, See An Introduction to DigitalOcean Spaces

import pulumi
import pulumi_digitalocean as digitalocean

foobar = digitalocean.SpacesBucket("foobar", region="nyc3")
index = digitalocean.SpacesBucketObject("index",
    region=foobar.region,
    bucket=foobar.name,
    key="index.html",
    content="<html><body><p>This page is empty.</p></body></html>",
    content_type="text/html")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • acl (pulumi.Input[str]) – The canned ACL to apply. DigitalOcean supports “private” and “public-read”. (Defaults to “private”.)

  • bucket (pulumi.Input[str]) – The name of the bucket to put the file in.

  • cache_control (pulumi.Input[str]) – Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

  • content (pulumi.Input[str]) – Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

  • content_base64 (pulumi.Input[str]) – Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

  • content_disposition (pulumi.Input[str]) – Specifies presentational information for the object. Read w3c content_disposition for further information.

  • content_encoding (pulumi.Input[str]) – Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

  • content_language (pulumi.Input[str]) – The language the content is in e.g. en-US or en-GB.

  • content_type (pulumi.Input[str]) – A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

  • etag (pulumi.Input[str]) – Used to trigger updates. The only meaningful value is ${filemd5("path/to/file")}.

  • force_destroy (pulumi.Input[bool]) – Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.

  • key (pulumi.Input[str]) – The name of the object once it is in the bucket.

  • metadata (pulumi.Input[dict]) – A mapping of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).

  • region (pulumi.Input[str]) – The region where the bucket resides (Defaults to nyc3)

  • source (pulumi.Input[str]) – The path to a file that will be read and uploaded as raw bytes for the object content.

  • website_redirect (pulumi.Input[str]) – Specifies a target URL for website redirect.

acl: pulumi.Output[str] = None

The canned ACL to apply. DigitalOcean supports “private” and “public-read”. (Defaults to “private”.)

bucket: pulumi.Output[str] = None

The name of the bucket to put the file in.

cache_control: pulumi.Output[str] = None

Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

content: pulumi.Output[str] = None

Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

content_base64: pulumi.Output[str] = None

Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

content_disposition: pulumi.Output[str] = None

Specifies presentational information for the object. Read w3c content_disposition for further information.

content_encoding: pulumi.Output[str] = None

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

content_language: pulumi.Output[str] = None

The language the content is in e.g. en-US or en-GB.

content_type: pulumi.Output[str] = None

A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

etag: pulumi.Output[str] = None

Used to trigger updates. The only meaningful value is ${filemd5("path/to/file")}.

force_destroy: pulumi.Output[bool] = None

Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.

key: pulumi.Output[str] = None

The name of the object once it is in the bucket.

metadata: pulumi.Output[dict] = None

A mapping of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).

region: pulumi.Output[str] = None

The region where the bucket resides (Defaults to nyc3)

source: pulumi.Output[str] = None

The path to a file that will be read and uploaded as raw bytes for the object content.

version_id: pulumi.Output[str] = None

A unique version ID value for the object, if bucket versioning is enabled.

website_redirect: pulumi.Output[str] = None

Specifies a target URL for website redirect.

static get(resource_name, id, opts=None, acl=None, bucket=None, cache_control=None, content=None, content_base64=None, content_disposition=None, content_encoding=None, content_language=None, content_type=None, etag=None, force_destroy=None, key=None, metadata=None, region=None, source=None, version_id=None, website_redirect=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • acl (pulumi.Input[str]) – The canned ACL to apply. DigitalOcean supports “private” and “public-read”. (Defaults to “private”.)

  • bucket (pulumi.Input[str]) – The name of the bucket to put the file in.

  • cache_control (pulumi.Input[str]) –

    Specifies caching behavior along the request/reply chain Read w3c cache_control for further details.

  • content (pulumi.Input[str]) – Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

  • content_base64 (pulumi.Input[str]) – Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

  • content_disposition (pulumi.Input[str]) –

    Specifies presentational information for the object. Read w3c content_disposition for further information.

  • content_encoding (pulumi.Input[str]) –

    Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read w3c content encoding for further information.

  • content_language (pulumi.Input[str]) – The language the content is in e.g. en-US or en-GB.

  • content_type (pulumi.Input[str]) – A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.

  • etag (pulumi.Input[str]) – Used to trigger updates. The only meaningful value is ${filemd5("path/to/file")}.

  • force_destroy (pulumi.Input[bool]) – Allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has S3 object lock enabled.

  • key (pulumi.Input[str]) – The name of the object once it is in the bucket.

  • metadata (pulumi.Input[dict]) – A mapping of keys/values to provision metadata (will be automatically prefixed by x-amz-meta-, note that only lowercase label are currently supported by the AWS Go API).

  • region (pulumi.Input[str]) – The region where the bucket resides (Defaults to nyc3)

  • source (pulumi.Input[str]) – The path to a file that will be read and uploaded as raw bytes for the object content.

  • version_id (pulumi.Input[str]) – A unique version ID value for the object, if bucket versioning is enabled.

  • website_redirect (pulumi.Input[str]) –

    Specifies a target URL for website redirect.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.SshKey(resource_name, opts=None, name=None, public_key=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean SSH key resource to allow you to manage SSH keys for Droplet access. Keys created with this resource can be referenced in your Droplet configuration via their ID or fingerprint.

import pulumi
import pulumi_digitalocean as digitalocean

# Create a new SSH key
default = digitalocean.SshKey("default", public_key=(lambda path: open(path).read())("/Users/myuser/.ssh/id_rsa.pub"))
# Create a new Droplet using the SSH key
web = digitalocean.Droplet("web",
    image="ubuntu-18-04-x64",
    region="nyc3",
    size="s-1vcpu-1gb",
    ssh_keys=[default.fingerprint])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the SSH key for identification

  • public_key (pulumi.Input[str]) – The public key. If this is a file, it can be read using the file interpolation function

fingerprint: pulumi.Output[str] = None

The fingerprint of the SSH key

name: pulumi.Output[str] = None

The name of the SSH key for identification

public_key: pulumi.Output[str] = None

The public key. If this is a file, it can be read using the file interpolation function

static get(resource_name, id, opts=None, fingerprint=None, name=None, public_key=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • fingerprint (pulumi.Input[str]) – The fingerprint of the SSH key

  • name (pulumi.Input[str]) – The name of the SSH key for identification

  • public_key (pulumi.Input[str]) – The public key. If this is a file, it can be read using the file interpolation function

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Tag(resource_name, opts=None, name=None, __props__=None, __name__=None, __opts__=None)

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.

import pulumi
import pulumi_digitalocean as digitalocean

# Create a new tag
foobar = digitalocean.Tag("foobar")
# Create a new Droplet in nyc3 with the foobar tag
web = digitalocean.Droplet("web",
    image="ubuntu-18-04-x64",
    region="nyc3",
    size="s-1vcpu-1gb",
    tags=[foobar.id])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the tag

databases_count: pulumi.Output[float] = None

A count of the database clusters that the tag is applied to.

droplets_count: pulumi.Output[float] = None

A count of the Droplets the tag is applied to.

images_count: pulumi.Output[float] = None

A count of the images that the tag is applied to.

name: pulumi.Output[str] = None

The name of the tag

total_resource_count: pulumi.Output[float] = None

A count of the total number of resources that the tag is applied to.

volume_snapshots_count: pulumi.Output[float] = None

A count of the volume snapshots that the tag is applied to.

volumes_count: pulumi.Output[float] = None

A count of the volumes that the tag is applied to.

static get(resource_name, id, opts=None, databases_count=None, droplets_count=None, images_count=None, name=None, total_resource_count=None, volume_snapshots_count=None, volumes_count=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • databases_count (pulumi.Input[float]) – A count of the database clusters that the tag is applied to.

  • droplets_count (pulumi.Input[float]) – A count of the Droplets the tag is applied to.

  • images_count (pulumi.Input[float]) – A count of the images that the tag is applied to.

  • name (pulumi.Input[str]) – The name of the tag

  • total_resource_count (pulumi.Input[float]) – A count of the total number of resources that the tag is applied to.

  • volume_snapshots_count (pulumi.Input[float]) – A count of the volume snapshots that the tag is applied to.

  • volumes_count (pulumi.Input[float]) – A count of the volumes that the tag is applied to.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Volume(resource_name, opts=None, description=None, filesystem_type=None, initial_filesystem_label=None, initial_filesystem_type=None, name=None, region=None, size=None, snapshot_id=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Block Storage volume which can be attached to a Droplet in order to provide expanded storage.

import pulumi
import pulumi_digitalocean as digitalocean

foobar_volume = digitalocean.Volume("foobarVolume",
    region="nyc1",
    size=100,
    initial_filesystem_type="ext4",
    description="an example volume")
foobar_droplet = digitalocean.Droplet("foobarDroplet",
    size="s-1vcpu-1gb",
    image="ubuntu-18-04-x64",
    region="nyc1")
foobar_volume_attachment = digitalocean.VolumeAttachment("foobarVolumeAttachment",
    droplet_id=foobar_droplet.id,
    volume_id=foobar_volume.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A free-form text field up to a limit of 1024 bytes to describe a block storage volume.

  • filesystem_type (pulumi.Input[str]) – Filesystem type (xfs or ext4) for the block storage volume.

  • initial_filesystem_label (pulumi.Input[str]) – Initial filesystem label for the block storage volume.

  • initial_filesystem_type (pulumi.Input[str]) – Initial filesystem type (xfs or ext4) for the block storage volume.

  • name (pulumi.Input[str]) – A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and “-“, up to a limit of 64 characters.

  • region (pulumi.Input[str]) – The region that the block storage volume will be created in.

  • size (pulumi.Input[float]) – The size of the block storage volume in GiB. If updated, can only be expanded.

  • snapshot_id (pulumi.Input[str]) – The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot

  • tags (pulumi.Input[list]) – A list of the tags to be applied to this Volume.

description: pulumi.Output[str] = None

A free-form text field up to a limit of 1024 bytes to describe a block storage volume.

droplet_ids: pulumi.Output[list] = None

A list of associated droplet ids.

filesystem_label: pulumi.Output[str] = None

Filesystem label for the block storage volume.

filesystem_type: pulumi.Output[str] = None

Filesystem type (xfs or ext4) for the block storage volume.

initial_filesystem_label: pulumi.Output[str] = None

Initial filesystem label for the block storage volume.

initial_filesystem_type: pulumi.Output[str] = None

Initial filesystem type (xfs or ext4) for the block storage volume.

name: pulumi.Output[str] = None

A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and “-“, up to a limit of 64 characters.

region: pulumi.Output[str] = None

The region that the block storage volume will be created in.

size: pulumi.Output[float] = None

The size of the block storage volume in GiB. If updated, can only be expanded.

snapshot_id: pulumi.Output[str] = None

The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot

tags: pulumi.Output[list] = None

A list of the tags to be applied to this Volume.

volume_urn: pulumi.Output[str] = None

The uniform resource name for the volume.

static get(resource_name, id, opts=None, description=None, droplet_ids=None, filesystem_label=None, filesystem_type=None, initial_filesystem_label=None, initial_filesystem_type=None, name=None, region=None, size=None, snapshot_id=None, tags=None, volume_urn=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A free-form text field up to a limit of 1024 bytes to describe a block storage volume.

  • droplet_ids (pulumi.Input[list]) – A list of associated droplet ids.

  • filesystem_label (pulumi.Input[str]) – Filesystem label for the block storage volume.

  • filesystem_type (pulumi.Input[str]) – Filesystem type (xfs or ext4) for the block storage volume.

  • initial_filesystem_label (pulumi.Input[str]) – Initial filesystem label for the block storage volume.

  • initial_filesystem_type (pulumi.Input[str]) – Initial filesystem type (xfs or ext4) for the block storage volume.

  • name (pulumi.Input[str]) – A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and “-“, up to a limit of 64 characters.

  • region (pulumi.Input[str]) – The region that the block storage volume will be created in.

  • size (pulumi.Input[float]) – The size of the block storage volume in GiB. If updated, can only be expanded.

  • snapshot_id (pulumi.Input[str]) – The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot

  • tags (pulumi.Input[list]) – A list of the tags to be applied to this Volume.

  • volume_urn (pulumi.Input[str]) – The uniform resource name for the volume.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.VolumeAttachment(resource_name, opts=None, droplet_id=None, volume_id=None, __props__=None, __name__=None, __opts__=None)

Manages attaching a Volume to a Droplet.

NOTE: Volumes can be attached either directly on the .Droplet resource, or using the .VolumeAttachment resource - but the two cannot be used together. If both are used against the same Droplet, the volume attachments will constantly drift.

import pulumi
import pulumi_digitalocean as digitalocean

foobar_volume = digitalocean.Volume("foobarVolume",
    region="nyc1",
    size=100,
    initial_filesystem_type="ext4",
    description="an example volume")
foobar_droplet = digitalocean.Droplet("foobarDroplet",
    size="s-1vcpu-1gb",
    image="ubuntu-18-04-x64",
    region="nyc1")
foobar_volume_attachment = digitalocean.VolumeAttachment("foobarVolumeAttachment",
    droplet_id=foobar_droplet.id,
    volume_id=foobar_volume.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • droplet_id (pulumi.Input[float]) – ID of the Droplet to attach the volume to.

  • volume_id (pulumi.Input[str]) – ID of the Volume to be attached to the Droplet.

droplet_id: pulumi.Output[float] = None

ID of the Droplet to attach the volume to.

volume_id: pulumi.Output[str] = None

ID of the Volume to be attached to the Droplet.

static get(resource_name, id, opts=None, droplet_id=None, volume_id=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • droplet_id (pulumi.Input[float]) – ID of the Droplet to attach the volume to.

  • volume_id (pulumi.Input[str]) – ID of the Volume to be attached to the Droplet.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.VolumeSnapshot(resource_name, opts=None, name=None, tags=None, volume_id=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean Volume Snapshot which can be used to create a snapshot from an existing volume.

import pulumi
import pulumi_digitalocean as digitalocean

foobar_volume = digitalocean.Volume("foobarVolume",
    region="nyc1",
    size=100,
    description="an example volume")
foobar_volume_snapshot = digitalocean.VolumeSnapshot("foobarVolumeSnapshot", volume_id=foobar_volume.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – A name for the volume snapshot.

  • tags (pulumi.Input[list]) – A list of the tags to be applied to this volume snapshot.

  • volume_id (pulumi.Input[str]) – The ID of the volume from which the volume snapshot originated.

created_at: pulumi.Output[str] = None

The date and time the volume snapshot was created.

min_disk_size: pulumi.Output[float] = None

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

name: pulumi.Output[str] = None

A name for the volume snapshot.

regions: pulumi.Output[list] = None

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

size: pulumi.Output[float] = None

The billable size of the volume snapshot in gigabytes.

tags: pulumi.Output[list] = None

A list of the tags to be applied to this volume snapshot.

volume_id: pulumi.Output[str] = None

The ID of the volume from which the volume snapshot originated.

static get(resource_name, id, opts=None, created_at=None, min_disk_size=None, name=None, regions=None, size=None, tags=None, volume_id=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • created_at (pulumi.Input[str]) – The date and time the volume snapshot was created.

  • min_disk_size (pulumi.Input[float]) – The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

  • name (pulumi.Input[str]) – A name for the volume snapshot.

  • regions (pulumi.Input[list]) – A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

  • size (pulumi.Input[float]) – The billable size of the volume snapshot in gigabytes.

  • tags (pulumi.Input[list]) – A list of the tags to be applied to this volume snapshot.

  • volume_id (pulumi.Input[str]) – The ID of the volume from which the volume snapshot originated.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_digitalocean.Vpc(resource_name, opts=None, description=None, ip_range=None, name=None, region=None, __props__=None, __name__=None, __opts__=None)

Provides a DigitalOcean VPC resource.

VPCs are virtual networks containing resources that can communicate with each other in full isolation, using private IP addresses.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.Vpc("example",
    ip_range="10.10.10.0/24",
    region="nyc3")
import pulumi
import pulumi_digitalocean as digitalocean

example_vpc = digitalocean.Vpc("exampleVpc", region="nyc3")
example_droplet = digitalocean.Droplet("exampleDroplet",
    size="s-1vcpu-1gb",
    image="ubuntu-18-04-x64",
    region="nyc3",
    vpc_uuid=example_vpc.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A free-form text field up to a limit of 255 characters to describe the VPC.

  • ip_range (pulumi.Input[str]) – The range of IP addresses for the VPC in CIDR notation. Network ranges cannot overlap with other networks in the same account and must be in range of private addresses as defined in RFC1918. It may not be larger than /16 or smaller than /24.

  • name (pulumi.Input[str]) – A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.

  • region (pulumi.Input[str]) – The DigitalOcean region slug for the VPC’s location.

created_at: pulumi.Output[str] = None

The date and time of when the VPC was created.

default: pulumi.Output[bool] = None

A boolean indicating whether or not the VPC is the default one for the region.

description: pulumi.Output[str] = None

A free-form text field up to a limit of 255 characters to describe the VPC.

ip_range: pulumi.Output[str] = None

The range of IP addresses for the VPC in CIDR notation. Network ranges cannot overlap with other networks in the same account and must be in range of private addresses as defined in RFC1918. It may not be larger than /16 or smaller than /24.

name: pulumi.Output[str] = None

A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.

region: pulumi.Output[str] = None

The DigitalOcean region slug for the VPC’s location.

vpc_urn: pulumi.Output[str] = None

The uniform resource name (URN) for the VPC.

static get(resource_name, id, opts=None, created_at=None, default=None, description=None, ip_range=None, name=None, region=None, vpc_urn=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • created_at (pulumi.Input[str]) – The date and time of when the VPC was created.

  • default (pulumi.Input[bool]) – A boolean indicating whether or not the VPC is the default one for the region.

  • description (pulumi.Input[str]) – A free-form text field up to a limit of 255 characters to describe the VPC.

  • ip_range (pulumi.Input[str]) – The range of IP addresses for the VPC in CIDR notation. Network ranges cannot overlap with other networks in the same account and must be in range of private addresses as defined in RFC1918. It may not be larger than /16 or smaller than /24.

  • name (pulumi.Input[str]) – A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.

  • region (pulumi.Input[str]) – The DigitalOcean region slug for the VPC’s location.

  • vpc_urn (pulumi.Input[str]) – The uniform resource name (URN) for the VPC.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_digitalocean.get_account(opts=None)

Get information on your DigitalOcean account.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_account()
pulumi_digitalocean.get_certificate(name=None, opts=None)

Get information on a certificate. This data source provides the name, type, state, domains, expiry date, and the sha1 fingerprint as configured on your DigitalOcean account. This is useful if the certificate in question is not managed by this provider or you need to utilize any of the certificates data.

An error is triggered if the provided certificate name does not exist.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_certificate(name="example")
Parameters

name (str) – The name of certificate.

pulumi_digitalocean.get_container_registry(name=None, opts=None)

Get information on a container registry. This data source provides the name as configured on your DigitalOcean account. This is useful if the container registry name in question is not managed by this provider or you need validate if the container registry exists in the account.

An error is triggered if the provided container registry name does not exist.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_container_registry(name="example")
Parameters

name (str) – The name of the container registry.

pulumi_digitalocean.get_database_cluster(name=None, tags=None, opts=None)

Provides information on a DigitalOcean database cluster resource.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_database_cluster(name="example-cluster")
pulumi.export("databaseOutput", example.uri)
Parameters

name (str) – The name of the database cluster.

pulumi_digitalocean.get_domain(name=None, opts=None)

Get information on a domain. This data source provides the name, TTL, and zone file as configured on your DigitalOcean account. This is useful if the domain name in question is not managed by this provider or you need to utilize TTL or zone file data.

An error is triggered if the provided domain name is not managed with your DigitalOcean account.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_domain(name="example.com")
pulumi.export("domainOutput", example.zone_file)
Parameters

name (str) – The name of the domain.

pulumi_digitalocean.get_droplet(id=None, name=None, tag=None, opts=None)

Get information on a Droplet for use in other resources. This data source provides all of the Droplet’s properties as configured on your DigitalOcean account. This is useful if the Droplet in question is not managed by this provider or you need to utilize any of the Droplet’s data.

Note: This data source returns a single Droplet. When specifying a tag, an error is triggered if more than one Droplet is found.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_droplet(name="web")
pulumi.export("dropletOutput", example.ipv4_address)
Parameters
  • id (float) – The ID of the Droplet

  • name (str) – The name of the Droplet.

  • tag (str) – A tag applied to the Droplet.

pulumi_digitalocean.get_droplet_snapshot(most_recent=None, name=None, name_regex=None, region=None, opts=None)

Droplet snapshots are saved instances of a Droplet. Use this data source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other resources.

import pulumi
import pulumi_digitalocean as digitalocean

web_snapshot = digitalocean.get_droplet_snapshot(most_recent=True,
    name_regex="^web",
    region="nyc3")
Parameters
  • most_recent (bool) – If more than one result is returned, use the most recent Droplet snapshot.

  • name (str) – The name of the Droplet snapshot.

  • name_regex (str) – A regex string to apply to the Droplet snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.

  • region (str) – A “slug” representing a DigitalOcean region (e.g. nyc1). If set, only Droplet snapshots available in the region will be returned.

pulumi_digitalocean.get_droplets(filters=None, sorts=None, opts=None)

Get information on Droplets for use in other resources, with the ability to filter and sort the results. If no filters are specified, all Droplets will be returned.

This data source is useful if the Droplets in question are not managed by this provider or you need to utilize any of the Droplets’ data.

Note: You can use the .Droplet data source to obtain metadata about a single Droplet if you already know the id, unique name, or unique tag to retrieve.

import pulumi
import pulumi_digitalocean as digitalocean

small = digitalocean.get_droplets(filters=[{
    "key": "size",
    "values": ["s-1vcpu-1gb"],
}])
Parameters
  • filters (list) – Filter the results. The filter block is documented below.

  • sorts (list) – Sort the results. The sort block is documented below.

The filters object supports the following:

  • key (str) - Filter the Droplets by this key. This may be one of ‘backups, created_at, disk, id, image, ipv4_address, ipv4_address_private, ipv6, ipv6_address, ipv6_address_private, locked, memory, monitoring, name, price_hourly, price_monthly, private_networking, region, size, status, tags, urn, vcpus, volume_ids, or vpc_uuid’.

  • values (list) - A list of values to match against the key field. Only retrieves Droplets where the key field takes on one or more of the values provided here.

The sorts object supports the following:

  • direction (str) - The sort direction. This may be either asc or desc.

  • key (str) - Sort the Droplets by this key. This may be one of backups, created_at, disk, id, image, ipv4_address, ipv4_address_private, ipv6, ipv6_address, ipv6_address_private, locked, memory, monitoring, name, price_hourly, price_monthly, private_networking, region, size, status, urn, vcpus, or vpc_uuid.

pulumi_digitalocean.get_floating_ip(ip_address=None, opts=None)

Get information on a floating ip. This data source provides the region and Droplet id as configured on your DigitalOcean account. This is useful if the floating IP in question is not managed by this provider or you need to find the Droplet the IP is attached to.

An error is triggered if the provided floating IP does not exist.

import pulumi
import pulumi_digitalocean as digitalocean

config = pulumi.Config()
public_ip = config.require_object("publicIp")
example = digitalocean.get_floating_ip(ip_address=public_ip)
pulumi.export("fipOutput", example.droplet_id)
Parameters

ip_address (str) – The allocated IP address of the specific floating IP to retrieve.

pulumi_digitalocean.get_image(id=None, name=None, slug=None, source=None, opts=None)

Get information on an image for use in other resources (e.g. creating a Droplet based on snapshot). This data source provides all of the image properties as configured on your DigitalOcean account. This is useful if the image in question is not managed by this provider or you need to utilize any of the image’s data.

An error is triggered if zero or more than one result is returned by the query.

import pulumi
import pulumi_digitalocean as digitalocean

example1 = digitalocean.get_image(name="example-1.0.0")
Parameters
  • id (float) – The id of the image

  • name (str) – The name of the image.

  • slug (str) – The slug of the official image.

  • source (str) – Restrict the search to one of the following categories of images:

- `all` - All images (whether public or private)
- `applications` - One-click applications
- `distributions` - Distributions
- `user` - (Default) User (private) images
pulumi_digitalocean.get_images(filters=None, sorts=None, opts=None)

Get information on images for use in other resources (e.g. creating a Droplet based on a snapshot), with the ability to filter and sort the results. If no filters are specified, all images will be returned.

This data source is useful if the image in question is not managed by this provider or you need to utilize any of the image’s data.

Note: You can use the .getImage data source to obtain metadata about a single image if you already know the slug, unique name, or id to retrieve.

import pulumi
import pulumi_digitalocean as digitalocean

ubuntu = digitalocean.get_images(filters=[{
    "key": "distribution",
    "values": ["Ubuntu"],
}])
Parameters
  • filters (list) – Filter the results. The filter block is documented below.

  • sorts (list) – Sort the results. The sort block is documented below.

The filters object supports the following:

  • key (str) - Filter the images by this key. This may be one of distribution, error_message, id, image, min_disk_size, name, private, regions, size_gigabytes, slug, status, tags, or type.

  • values (list) - A list of values to match against the key field. Only retrieves images where the key field takes on one or more of the values provided here.

The sorts object supports the following:

  • direction (str) - The sort direction. This may be either asc or desc.

  • key (str) - Sort the images by this key. This may be one of distribution, error_message, id, image, min_disk_size, name, private, size_gigabytes, slug, status, or type.

pulumi_digitalocean.get_kubernetes_cluster(name=None, tags=None, opts=None)

Retrieves information about a DigitalOcean Kubernetes cluster for use in other resources. This data source provides all of the cluster’s properties as configured on your DigitalOcean account. This is useful if the cluster in question is not managed by this provider.

Parameters
  • name (str) – The name of Kubernetes cluster.

  • tags (list) – A list of tag names to be applied to the Kubernetes cluster.

pulumi_digitalocean.get_kubernetes_versions(version_prefix=None, opts=None)

Provides access to the available DigitalOcean Kubernetes Service versions.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_kubernetes_versions()
pulumi.export("k8s-versions", example.valid_versions)
import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_kubernetes_versions()
example_cluster = digitalocean.KubernetesCluster("example-cluster",
    region="lon1",
    version=example.latest_version,
    node_pool={
        "name": "default",
        "size": "s-1vcpu-2gb",
        "node_count": 3,
    })
import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_kubernetes_versions(version_prefix="1.16.")
example_cluster = digitalocean.KubernetesCluster("example-cluster",
    region="lon1",
    version=example.latest_version,
    node_pool={
        "name": "default",
        "size": "s-1vcpu-2gb",
        "node_count": 3,
    })
Parameters

version_prefix (str) – If provided, this provider will only return versions that match the string prefix. For example, 1.15. will match all 1.15.x series releases.

pulumi_digitalocean.get_load_balancer(name=None, opts=None)

Get information on a load balancer for use in other resources. This data source provides all of the load balancers properties as configured on your DigitalOcean account. This is useful if the load balancer in question is not managed by this provider or you need to utilize any of the load balancers data.

An error is triggered if the provided load balancer name does not exist.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_load_balancer(name="app")
pulumi.export("lbOutput", example.ip)
Parameters

name (str) – The name of load balancer.

pulumi_digitalocean.get_project(id=None, name=None, opts=None)

Get information on a single DigitalOcean project. If neither the id nor name attributes are provided, then this data source returns the default project.

import pulumi
import pulumi_digitalocean as digitalocean

default = digitalocean.get_project()
staging = digitalocean.get_project(name="My Staging Project")
Parameters
  • id (str) – the ID of the project to retrieve

  • name (str) – the name of the project to retrieve. The data source will raise an error if more than one project has the provided name or if no project has that name.

pulumi_digitalocean.get_projects(filters=None, sorts=None, opts=None)

Retrieve information about all DigitalOcean projects associated with an account, with the ability to filter and sort the results. If no filters are specified, all projects will be returned.

Note: You can use the .Project data source to obtain metadata about a single project if you already know the id to retrieve or the unique name of the project.

import pulumi
import pulumi_digitalocean as digitalocean

staging = digitalocean.get_projects(filters=[{
    "key": "environment",
    "values": ["Staging"],
}])
Parameters
  • filters (list) – Filter the results. The filter block is documented below.

  • sorts (list) – Sort the results. The sort block is documented below.

The filters object supports the following:

  • key (str) - Filter the projects by this key. This may be one of name, purpose, description, environment, or is_default.

  • values (list) - A list of values to match against the key field. Only retrieves projects where the key field takes on one or more of the values provided here.

The sorts object supports the following:

  • direction (str) - The sort direction. This may be either asc or desc.

  • key (str) - Sort the projects by this key. This may be one of name, purpose, description, or environment.

pulumi_digitalocean.get_record(domain=None, name=None, opts=None)

Get information on a DNS record. This data source provides the name, TTL, and zone file as configured on your DigitalOcean account. This is useful if the record in question is not managed by this provider.

An error is triggered if the provided domain name or record are not managed with your DigitalOcean account.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_record(domain="example.com",
    name="test")
pulumi.export("recordType", example.type)
pulumi.export("recordTtl", example.ttl)
Parameters
  • domain (str) – The domain name of the record.

  • name (str) – The name of the record.

pulumi_digitalocean.get_region(slug=None, opts=None)

Get information on a single DigitalOcean region. This is useful to find out what Droplet sizes and features are supported within a region.

import pulumi
import pulumi_digitalocean as digitalocean

sfo2 = digitalocean.get_region(slug="sfo2")
pulumi.export("regionName", sfo2.name)
Parameters

slug (str) – A human-readable string that is used as a unique identifier for each region.

pulumi_digitalocean.get_regions(filters=None, sorts=None, opts=None)

Retrieve information about all supported DigitalOcean regions, with the ability to filter and sort the results. If no filters are specified, all regions will be returned.

Note: You can use the .getRegion data source to obtain metadata about a single region if you already know the slug to retrieve.

import pulumi
import pulumi_digitalocean as digitalocean

available = digitalocean.get_regions(filters=[{
    "key": "available",
    "values": ["true"],
}])
Parameters
  • filters (list) – Filter the results. The filter block is documented below.

  • sorts (list) – Sort the results. The sort block is documented below.

The filters object supports the following:

  • key (str) - Filter the regions by this key. This may be one of slug, name, available, features, or sizes.

  • values (list) - A list of values to match against the key field. Only retrieves regions where the key field takes on one or more of the values provided here.

The sorts object supports the following:

  • direction (str) - The sort direction. This may be either asc or desc.

  • key (str) - Sort the regions by this key. This may be one of slug, name, or available.

pulumi_digitalocean.get_sizes(filters=None, sorts=None, opts=None)

Retrieves information about the Droplet sizes that DigitalOcean supports, with the ability to filter and sort the results. If no filters are specified, all sizes will be returned.

import pulumi
import pulumi_digitalocean as digitalocean

main = digitalocean.get_sizes(filter=[{
    "key": "slug",
    "values": ["s-1vcpu-1gb"],
}])
web = digitalocean.Droplet("web",
    image="ubuntu-18-04-x64",
    region="sgp1",
    size=main.sizes[0]["slug"])
Parameters
  • filters (list) – Filter the results. The filter block is documented below.

  • sorts (list) – Sort the results. The sort block is documented below.

The filters object supports the following:

  • key (str) - Filter the sizes by this key. This may be one of slug, regions, memory, vcpus, disk, transfer, price_monthly, price_hourly, or available.

  • values (list) - Only retrieves images which keys has value that matches one of the values provided here.

The sorts object supports the following:

  • direction (str) - The sort direction. This may be either asc or desc.

  • key (str) - Sort the sizes by this key. This may be one of slug, memory, vcpus, disk, transfer, price_monthly, or price_hourly.

pulumi_digitalocean.get_spaces_bucket(name=None, region=None, opts=None)

Get information on a Spaces bucket for use in other resources. This is useful if the Spaces bucket in question is not managed by this provider or you need to utilize any of the bucket’s data.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_spaces_bucket(name="my-spaces-bucket",
    region="nyc3")
pulumi.export("bucketDomainName", example.bucket_domain_name)
Parameters
  • name (str) – The name of the Spaces bucket.

  • region (str) – The slug of the region where the bucket is stored.

pulumi_digitalocean.get_spaces_bucket_object(bucket=None, key=None, range=None, region=None, version_id=None, opts=None)

The Spaces object data source allows access to the metadata and optionally (see below) content of an object stored inside a Spaces bucket.

Note: The content of an object (body field) is available only for objects which have a human-readable Content-Type (text/* and application/json). This is to prevent printing unsafe characters and potentially downloading large amount of data which would be thrown away in favor of metadata.

import pulumi
import pulumi_digitalocean as digitalocean

bootstrap_script = digitalocean.get_spaces_bucket_object(bucket="ourcorp-deploy-config",
    region="nyc3",
    key="droplet-bootstrap-script.sh")
web = digitalocean.Droplet("web",
    image="ubuntu-18-04-x64",
    region="nyc2",
    size="s-1vcpu-1gb",
    user_data=bootstrap_script.body)
Parameters
  • bucket (str) – The name of the bucket to read the object from.

  • key (str) – The full path to the object inside the bucket

  • region (str) – The slug of the region where the bucket is stored.

  • version_id (str) – Specific version ID of the object returned (defaults to latest version)

pulumi_digitalocean.get_spaces_bucket_objects(bucket=None, delimiter=None, encoding_type=None, max_keys=None, prefix=None, region=None, opts=None)

NOTE on ``max_keys``: Retrieving very large numbers of keys can adversely affect this provider’s performance.

The bucket-objects data source returns keys (i.e., file names) and other metadata about objects in a Spaces bucket.

import pulumi
import pulumi_digitalocean as digitalocean

my_objects = digitalocean.get_spaces_bucket_objects(bucket="ourcorp",
    region="nyc3")
object_info = [digitalocean.get_spaces_bucket_object(key=my_objects.keys[__index],
    bucket=my_objects.bucket,
    region=my_objects.region) for __index in range(len(my_objects.keys))]
Parameters
  • bucket (str) – Lists object keys in this Spaces bucket

  • delimiter (str) – A character used to group keys (Default: none)

  • encoding_type (str) – Encodes keys using this method (Default: none; besides none, only “url” can be used)

  • max_keys (float) – Maximum object keys to return (Default: 1000)

  • prefix (str) – Limits results to object keys with this prefix (Default: none)

  • region (str) – The slug of the region where the bucket is stored.

pulumi_digitalocean.get_spaces_buckets(filters=None, sorts=None, opts=None)

Get information on Spaces buckets for use in other resources, with the ability to filter and sort the results. If no filters are specified, all Spaces buckets will be returned.

Note: You can use the .SpacesBucket data source to obtain metadata about a single bucket if you already know its name and region.

import pulumi
import pulumi_digitalocean as digitalocean

nyc3 = digitalocean.get_spaces_buckets(filters=[{
    "key": "region",
    "values": ["nyc3"],
}])
Parameters
  • filters (list) – Filter the results. The filter block is documented below.

  • sorts (list) – Sort the results. The sort block is documented below.

The filters object supports the following:

  • key (str) - Filter the images by this key. This may be one of bucket_domain_name, name, region, or urn.

  • values (list) - A list of values to match against the key field. Only retrieves images where the key field takes on one or more of the values provided here.

The sorts object supports the following:

  • direction (str) - The sort direction. This may be either asc or desc.

  • key (str) - Sort the images by this key. This may be one of bucket_domain_name, name, region, or urn.

pulumi_digitalocean.get_ssh_key(name=None, opts=None)

Get information on a ssh key. This data source provides the name, public key, and fingerprint as configured on your DigitalOcean account. This is useful if the ssh key in question is not managed by this provider or you need to utilize any of the keys data.

An error is triggered if the provided ssh key name does not exist.

import pulumi
import pulumi_digitalocean as digitalocean

example_ssh_key = digitalocean.get_ssh_key(name="example")
example_droplet = digitalocean.Droplet("exampleDroplet",
    image="ubuntu-18-04-x64",
    region="nyc2",
    size="s-1vcpu-1gb",
    ssh_keys=[example_ssh_key.id])
Parameters

name (str) – The name of the ssh key.

pulumi_digitalocean.get_tag(name=None, opts=None)

Get information on a tag. This data source provides the name as configured on your DigitalOcean account. This is useful if the tag name in question is not managed by this provider or you need validate if the tag exists in the account.

An error is triggered if the provided tag name does not exist.

import pulumi
import pulumi_digitalocean as digitalocean

example_tag = digitalocean.get_tag(name="example")
example_droplet = digitalocean.Droplet("exampleDroplet",
    image="ubuntu-18-04-x64",
    region="nyc2",
    size="s-1vcpu-1gb",
    tags=[example_tag.name])
Parameters

name (str) – The name of the tag.

pulumi_digitalocean.get_tags(filters=None, sorts=None, opts=None)

Returns a list of tags in your DigitalOcean account, with the ability to filter and sort the results. If no filters are specified, all tags will be returned.

Parameters
  • filters (list) – Filter the results. The filter block is documented below.

  • sorts (list) – Sort the results. The sort block is documented below.

The filters object supports the following:

  • key (str) - Filter the tags by this key. This may be one of name, total_resource_count, droplets_count, images_count, volumes_count, volume_snapshots_count, or databases_count.

  • values (list) - Only retrieves tags which keys has value that matches one of the values provided here.

The sorts object supports the following:

  • direction (str) - The sort direction. This may be either asc or desc.

  • key (str) - Sort the tags by this key. This may be one of name, total_resource_count, droplets_count, images_count, volumes_count, volume_snapshots_count, or databases_count.

pulumi_digitalocean.get_volume(description=None, name=None, region=None, opts=None)

Get information on a volume for use in other resources. This data source provides all of the volumes properties as configured on your DigitalOcean account. This is useful if the volume in question is not managed by this provider or you need to utilize any of the volumes data.

An error is triggered if the provided volume name does not exist.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_volume(name="app-data",
    region="nyc3")
Parameters
  • description (str) – Text describing a block storage volume.

  • name (str) – The name of block storage volume.

  • region (str) – The region the block storage volume is provisioned in.

pulumi_digitalocean.get_volume_snapshot(most_recent=None, name=None, name_regex=None, region=None, opts=None)

Volume snapshots are saved instances of a block storage volume. Use this data source to retrieve the ID of a DigitalOcean volume snapshot for use in other resources.

import pulumi
import pulumi_digitalocean as digitalocean

snapshot = digitalocean.get_volume_snapshot(most_recent=True,
    name_regex="^web",
    region="nyc3")
Parameters
  • most_recent (bool) – If more than one result is returned, use the most recent volume snapshot.

  • name (str) – The name of the volume snapshot.

  • name_regex (str) – A regex string to apply to the volume snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.

  • region (str) – A “slug” representing a DigitalOcean region (e.g. nyc1). If set, only volume snapshots available in the region will be returned.

pulumi_digitalocean.get_vpc(id=None, name=None, region=None, opts=None)

Retrieve information about a VPC for use in other resources.

This data source provides all of the VPC’s properties as configured on your DigitalOcean account. This is useful if the VPC in question is not managed by this provider or you need to utilize any of the VPC’s data.

VPCs may be looked up by id or name. Specifying a region will return that that region’s default VPC.

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_vpc(name="example-network")
Parameters
  • id (str) – The unique identifier of an existing VPC.

  • name (str) – The name of an existing VPC.

  • region (str) – The DigitalOcean region slug for the VPC’s location.