1. Packages
  2. DigitalOcean Provider
  3. API Docs
  4. Certificate
DigitalOcean v4.41.0 published on Wednesday, Mar 26, 2025 by Pulumi

digitalocean.Certificate

Explore with Pulumi AI

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.

Example Usage

Custom Certificate

import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
import * as std from "@pulumi/std";

const cert = new digitalocean.Certificate("cert", {
    name: "custom-example",
    type: digitalocean.CertificateType.Custom,
    privateKey: std.file({
        input: "/Users/myuser/certs/privkey.pem",
    }).then(invoke => invoke.result),
    leafCertificate: std.file({
        input: "/Users/myuser/certs/cert.pem",
    }).then(invoke => invoke.result),
    certificateChain: std.file({
        input: "/Users/myuser/certs/fullchain.pem",
    }).then(invoke => invoke.result),
});
Copy
import pulumi
import pulumi_digitalocean as digitalocean
import pulumi_std as std

cert = digitalocean.Certificate("cert",
    name="custom-example",
    type=digitalocean.CertificateType.CUSTOM,
    private_key=std.file(input="/Users/myuser/certs/privkey.pem").result,
    leaf_certificate=std.file(input="/Users/myuser/certs/cert.pem").result,
    certificate_chain=std.file(input="/Users/myuser/certs/fullchain.pem").result)
Copy
package main

import (
	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		invokeFile, err := std.File(ctx, &std.FileArgs{
			Input: "/Users/myuser/certs/privkey.pem",
		}, nil)
		if err != nil {
			return err
		}
		invokeFile1, err := std.File(ctx, &std.FileArgs{
			Input: "/Users/myuser/certs/cert.pem",
		}, nil)
		if err != nil {
			return err
		}
		invokeFile2, err := std.File(ctx, &std.FileArgs{
			Input: "/Users/myuser/certs/fullchain.pem",
		}, nil)
		if err != nil {
			return err
		}
		_, err = digitalocean.NewCertificate(ctx, "cert", &digitalocean.CertificateArgs{
			Name:             pulumi.String("custom-example"),
			Type:             pulumi.String(digitalocean.CertificateTypeCustom),
			PrivateKey:       pulumi.String(invokeFile.Result),
			LeafCertificate:  pulumi.String(invokeFile1.Result),
			CertificateChain: pulumi.String(invokeFile2.Result),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
using Std = Pulumi.Std;

return await Deployment.RunAsync(() => 
{
    var cert = new DigitalOcean.Certificate("cert", new()
    {
        Name = "custom-example",
        Type = DigitalOcean.CertificateType.Custom,
        PrivateKey = Std.File.Invoke(new()
        {
            Input = "/Users/myuser/certs/privkey.pem",
        }).Apply(invoke => invoke.Result),
        LeafCertificate = Std.File.Invoke(new()
        {
            Input = "/Users/myuser/certs/cert.pem",
        }).Apply(invoke => invoke.Result),
        CertificateChain = Std.File.Invoke(new()
        {
            Input = "/Users/myuser/certs/fullchain.pem",
        }).Apply(invoke => invoke.Result),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Certificate;
import com.pulumi.digitalocean.CertificateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var cert = new Certificate("cert", CertificateArgs.builder()
            .name("custom-example")
            .type("custom")
            .privateKey(StdFunctions.file(FileArgs.builder()
                .input("/Users/myuser/certs/privkey.pem")
                .build()).result())
            .leafCertificate(StdFunctions.file(FileArgs.builder()
                .input("/Users/myuser/certs/cert.pem")
                .build()).result())
            .certificateChain(StdFunctions.file(FileArgs.builder()
                .input("/Users/myuser/certs/fullchain.pem")
                .build()).result())
            .build());

    }
}
Copy
resources:
  cert:
    type: digitalocean:Certificate
    properties:
      name: custom-example
      type: custom
      privateKey:
        fn::invoke:
          function: std:file
          arguments:
            input: /Users/myuser/certs/privkey.pem
          return: result
      leafCertificate:
        fn::invoke:
          function: std:file
          arguments:
            input: /Users/myuser/certs/cert.pem
          return: result
      certificateChain:
        fn::invoke:
          function: std:file
          arguments:
            input: /Users/myuser/certs/fullchain.pem
          return: result
Copy

Let’s Encrypt Certificate

import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const cert = new digitalocean.Certificate("cert", {
    name: "le-example",
    type: digitalocean.CertificateType.LetsEncrypt,
    domains: ["example.com"],
});
Copy
import pulumi
import pulumi_digitalocean as digitalocean

cert = digitalocean.Certificate("cert",
    name="le-example",
    type=digitalocean.CertificateType.LETS_ENCRYPT,
    domains=["example.com"])
Copy
package main

import (
	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := digitalocean.NewCertificate(ctx, "cert", &digitalocean.CertificateArgs{
			Name: pulumi.String("le-example"),
			Type: pulumi.String(digitalocean.CertificateTypeLetsEncrypt),
			Domains: pulumi.StringArray{
				pulumi.String("example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

return await Deployment.RunAsync(() => 
{
    var cert = new DigitalOcean.Certificate("cert", new()
    {
        Name = "le-example",
        Type = DigitalOcean.CertificateType.LetsEncrypt,
        Domains = new[]
        {
            "example.com",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Certificate;
import com.pulumi.digitalocean.CertificateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var cert = new Certificate("cert", CertificateArgs.builder()
            .name("le-example")
            .type("lets_encrypt")
            .domains("example.com")
            .build());

    }
}
Copy
resources:
  cert:
    type: digitalocean:Certificate
    properties:
      name: le-example
      type: lets_encrypt
      domains:
        - example.com
Copy

Use with Other Resources

Both custom and Let’s Encrypt certificates can be used with other resources including the digitalocean.LoadBalancer and digitalocean.Cdn resources.

import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const cert = new digitalocean.Certificate("cert", {
    name: "le-example",
    type: digitalocean.CertificateType.LetsEncrypt,
    domains: ["example.com"],
});
// Create a new Load Balancer with TLS termination
const _public = new digitalocean.LoadBalancer("public", {
    name: "secure-loadbalancer-1",
    region: digitalocean.Region.NYC3,
    dropletTag: "backend",
    forwardingRules: [{
        entryPort: 443,
        entryProtocol: "https",
        targetPort: 80,
        targetProtocol: "http",
        certificateName: cert.name,
    }],
});
Copy
import pulumi
import pulumi_digitalocean as digitalocean

cert = digitalocean.Certificate("cert",
    name="le-example",
    type=digitalocean.CertificateType.LETS_ENCRYPT,
    domains=["example.com"])
# Create a new Load Balancer with TLS termination
public = digitalocean.LoadBalancer("public",
    name="secure-loadbalancer-1",
    region=digitalocean.Region.NYC3,
    droplet_tag="backend",
    forwarding_rules=[{
        "entry_port": 443,
        "entry_protocol": "https",
        "target_port": 80,
        "target_protocol": "http",
        "certificate_name": cert.name,
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cert, err := digitalocean.NewCertificate(ctx, "cert", &digitalocean.CertificateArgs{
			Name: pulumi.String("le-example"),
			Type: pulumi.String(digitalocean.CertificateTypeLetsEncrypt),
			Domains: pulumi.StringArray{
				pulumi.String("example.com"),
			},
		})
		if err != nil {
			return err
		}
		// Create a new Load Balancer with TLS termination
		_, err = digitalocean.NewLoadBalancer(ctx, "public", &digitalocean.LoadBalancerArgs{
			Name:       pulumi.String("secure-loadbalancer-1"),
			Region:     pulumi.String(digitalocean.RegionNYC3),
			DropletTag: pulumi.String("backend"),
			ForwardingRules: digitalocean.LoadBalancerForwardingRuleArray{
				&digitalocean.LoadBalancerForwardingRuleArgs{
					EntryPort:       pulumi.Int(443),
					EntryProtocol:   pulumi.String("https"),
					TargetPort:      pulumi.Int(80),
					TargetProtocol:  pulumi.String("http"),
					CertificateName: cert.Name,
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

return await Deployment.RunAsync(() => 
{
    var cert = new DigitalOcean.Certificate("cert", new()
    {
        Name = "le-example",
        Type = DigitalOcean.CertificateType.LetsEncrypt,
        Domains = new[]
        {
            "example.com",
        },
    });

    // Create a new Load Balancer with TLS termination
    var @public = new DigitalOcean.LoadBalancer("public", new()
    {
        Name = "secure-loadbalancer-1",
        Region = DigitalOcean.Region.NYC3,
        DropletTag = "backend",
        ForwardingRules = new[]
        {
            new DigitalOcean.Inputs.LoadBalancerForwardingRuleArgs
            {
                EntryPort = 443,
                EntryProtocol = "https",
                TargetPort = 80,
                TargetProtocol = "http",
                CertificateName = cert.Name,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Certificate;
import com.pulumi.digitalocean.CertificateArgs;
import com.pulumi.digitalocean.LoadBalancer;
import com.pulumi.digitalocean.LoadBalancerArgs;
import com.pulumi.digitalocean.inputs.LoadBalancerForwardingRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var cert = new Certificate("cert", CertificateArgs.builder()
            .name("le-example")
            .type("lets_encrypt")
            .domains("example.com")
            .build());

        // Create a new Load Balancer with TLS termination
        var public_ = new LoadBalancer("public", LoadBalancerArgs.builder()
            .name("secure-loadbalancer-1")
            .region("nyc3")
            .dropletTag("backend")
            .forwardingRules(LoadBalancerForwardingRuleArgs.builder()
                .entryPort(443)
                .entryProtocol("https")
                .targetPort(80)
                .targetProtocol("http")
                .certificateName(cert.name())
                .build())
            .build());

    }
}
Copy
resources:
  cert:
    type: digitalocean:Certificate
    properties:
      name: le-example
      type: lets_encrypt
      domains:
        - example.com
  # Create a new Load Balancer with TLS termination
  public:
    type: digitalocean:LoadBalancer
    properties:
      name: secure-loadbalancer-1
      region: nyc3
      dropletTag: backend
      forwardingRules:
        - entryPort: 443
          entryProtocol: https
          targetPort: 80
          targetProtocol: http
          certificateName: ${cert.name}
Copy

Create Certificate Resource

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

Constructor syntax

new Certificate(name: string, args?: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: str,
                args: Optional[CertificateArgs] = None,
                opts: Optional[ResourceOptions] = None)

@overload
def Certificate(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                certificate_chain: Optional[str] = None,
                domains: Optional[Sequence[str]] = None,
                leaf_certificate: Optional[str] = None,
                name: Optional[str] = None,
                private_key: Optional[str] = None,
                type: Optional[Union[str, CertificateType]] = None)
func NewCertificate(ctx *Context, name string, args *CertificateArgs, opts ...ResourceOption) (*Certificate, error)
public Certificate(string name, CertificateArgs? args = null, CustomResourceOptions? opts = null)
public Certificate(String name, CertificateArgs args)
public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
type: digitalocean:Certificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

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

var certificateResource = new DigitalOcean.Certificate("certificateResource", new()
{
    CertificateChain = "string",
    Domains = new[]
    {
        "string",
    },
    LeafCertificate = "string",
    Name = "string",
    PrivateKey = "string",
    Type = "string",
});
Copy
example, err := digitalocean.NewCertificate(ctx, "certificateResource", &digitalocean.CertificateArgs{
	CertificateChain: pulumi.String("string"),
	Domains: pulumi.StringArray{
		pulumi.String("string"),
	},
	LeafCertificate: pulumi.String("string"),
	Name:            pulumi.String("string"),
	PrivateKey:      pulumi.String("string"),
	Type:            pulumi.String("string"),
})
Copy
var certificateResource = new Certificate("certificateResource", CertificateArgs.builder()
    .certificateChain("string")
    .domains("string")
    .leafCertificate("string")
    .name("string")
    .privateKey("string")
    .type("string")
    .build());
Copy
certificate_resource = digitalocean.Certificate("certificateResource",
    certificate_chain="string",
    domains=["string"],
    leaf_certificate="string",
    name="string",
    private_key="string",
    type="string")
Copy
const certificateResource = new digitalocean.Certificate("certificateResource", {
    certificateChain: "string",
    domains: ["string"],
    leafCertificate: "string",
    name: "string",
    privateKey: "string",
    type: "string",
});
Copy
type: digitalocean:Certificate
properties:
    certificateChain: string
    domains:
        - string
    leafCertificate: string
    name: string
    privateKey: string
    type: string
Copy

Certificate Resource Properties

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

Inputs

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

The Certificate resource accepts the following input properties:

CertificateChain Changes to this property will trigger replacement. string
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 Changes to this property will trigger replacement. List<string>
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.
LeafCertificate Changes to this property will trigger replacement. string
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
Name Changes to this property will trigger replacement. string
The name of the certificate for identification.
PrivateKey Changes to this property will trigger replacement. string
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
Type Changes to this property will trigger replacement. string | Pulumi.DigitalOcean.CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
CertificateChain Changes to this property will trigger replacement. string
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 Changes to this property will trigger replacement. []string
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.
LeafCertificate Changes to this property will trigger replacement. string
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
Name Changes to this property will trigger replacement. string
The name of the certificate for identification.
PrivateKey Changes to this property will trigger replacement. string
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
Type Changes to this property will trigger replacement. string | CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
certificateChain Changes to this property will trigger replacement. String
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 Changes to this property will trigger replacement. List<String>
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.
leafCertificate Changes to this property will trigger replacement. String
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
name Changes to this property will trigger replacement. String
The name of the certificate for identification.
privateKey Changes to this property will trigger replacement. String
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
type Changes to this property will trigger replacement. String | CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
certificateChain Changes to this property will trigger replacement. string
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 Changes to this property will trigger replacement. string[]
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.
leafCertificate Changes to this property will trigger replacement. string
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
name Changes to this property will trigger replacement. string
The name of the certificate for identification.
privateKey Changes to this property will trigger replacement. string
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
type Changes to this property will trigger replacement. string | CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
certificate_chain Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]
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 Changes to this property will trigger replacement. str
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
name Changes to this property will trigger replacement. str
The name of the certificate for identification.
private_key Changes to this property will trigger replacement. str
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
type Changes to this property will trigger replacement. str | CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
certificateChain Changes to this property will trigger replacement. String
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 Changes to this property will trigger replacement. List<String>
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.
leafCertificate Changes to this property will trigger replacement. String
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
name Changes to this property will trigger replacement. String
The name of the certificate for identification.
privateKey Changes to this property will trigger replacement. String
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
type Changes to this property will trigger replacement. String | "lets_encrypt" | "custom"
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
NotAfter string
The expiration date of the certificate
Sha1Fingerprint string
The SHA-1 fingerprint of the certificate
State string
Uuid string
The UUID of the certificate
Id string
The provider-assigned unique ID for this managed resource.
NotAfter string
The expiration date of the certificate
Sha1Fingerprint string
The SHA-1 fingerprint of the certificate
State string
Uuid string
The UUID of the certificate
id String
The provider-assigned unique ID for this managed resource.
notAfter String
The expiration date of the certificate
sha1Fingerprint String
The SHA-1 fingerprint of the certificate
state String
uuid String
The UUID of the certificate
id string
The provider-assigned unique ID for this managed resource.
notAfter string
The expiration date of the certificate
sha1Fingerprint string
The SHA-1 fingerprint of the certificate
state string
uuid string
The UUID of the certificate
id str
The provider-assigned unique ID for this managed resource.
not_after str
The expiration date of the certificate
sha1_fingerprint str
The SHA-1 fingerprint of the certificate
state str
uuid str
The UUID of the certificate
id String
The provider-assigned unique ID for this managed resource.
notAfter String
The expiration date of the certificate
sha1Fingerprint String
The SHA-1 fingerprint of the certificate
state String
uuid String
The UUID of the certificate

Look up Existing Certificate Resource

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

public static get(name: string, id: Input<ID>, state?: CertificateState, opts?: CustomResourceOptions): Certificate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        certificate_chain: Optional[str] = None,
        domains: Optional[Sequence[str]] = None,
        leaf_certificate: Optional[str] = None,
        name: Optional[str] = None,
        not_after: Optional[str] = None,
        private_key: Optional[str] = None,
        sha1_fingerprint: Optional[str] = None,
        state: Optional[str] = None,
        type: Optional[Union[str, CertificateType]] = None,
        uuid: Optional[str] = None) -> Certificate
func GetCertificate(ctx *Context, name string, id IDInput, state *CertificateState, opts ...ResourceOption) (*Certificate, error)
public static Certificate Get(string name, Input<string> id, CertificateState? state, CustomResourceOptions? opts = null)
public static Certificate get(String name, Output<String> id, CertificateState state, CustomResourceOptions options)
resources:  _:    type: digitalocean:Certificate    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CertificateChain Changes to this property will trigger replacement. string
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 Changes to this property will trigger replacement. List<string>
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.
LeafCertificate Changes to this property will trigger replacement. string
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
Name Changes to this property will trigger replacement. string
The name of the certificate for identification.
NotAfter string
The expiration date of the certificate
PrivateKey Changes to this property will trigger replacement. string
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
Sha1Fingerprint string
The SHA-1 fingerprint of the certificate
State string
Type Changes to this property will trigger replacement. string | Pulumi.DigitalOcean.CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
Uuid string
The UUID of the certificate
CertificateChain Changes to this property will trigger replacement. string
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 Changes to this property will trigger replacement. []string
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.
LeafCertificate Changes to this property will trigger replacement. string
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
Name Changes to this property will trigger replacement. string
The name of the certificate for identification.
NotAfter string
The expiration date of the certificate
PrivateKey Changes to this property will trigger replacement. string
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
Sha1Fingerprint string
The SHA-1 fingerprint of the certificate
State string
Type Changes to this property will trigger replacement. string | CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
Uuid string
The UUID of the certificate
certificateChain Changes to this property will trigger replacement. String
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 Changes to this property will trigger replacement. List<String>
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.
leafCertificate Changes to this property will trigger replacement. String
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
name Changes to this property will trigger replacement. String
The name of the certificate for identification.
notAfter String
The expiration date of the certificate
privateKey Changes to this property will trigger replacement. String
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
sha1Fingerprint String
The SHA-1 fingerprint of the certificate
state String
type Changes to this property will trigger replacement. String | CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
uuid String
The UUID of the certificate
certificateChain Changes to this property will trigger replacement. string
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 Changes to this property will trigger replacement. string[]
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.
leafCertificate Changes to this property will trigger replacement. string
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
name Changes to this property will trigger replacement. string
The name of the certificate for identification.
notAfter string
The expiration date of the certificate
privateKey Changes to this property will trigger replacement. string
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
sha1Fingerprint string
The SHA-1 fingerprint of the certificate
state string
type Changes to this property will trigger replacement. string | CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
uuid string
The UUID of the certificate
certificate_chain Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]
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 Changes to this property will trigger replacement. str
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
name Changes to this property will trigger replacement. str
The name of the certificate for identification.
not_after str
The expiration date of the certificate
private_key Changes to this property will trigger replacement. str
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
sha1_fingerprint str
The SHA-1 fingerprint of the certificate
state str
type Changes to this property will trigger replacement. str | CertificateType
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
uuid str
The UUID of the certificate
certificateChain Changes to this property will trigger replacement. String
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 Changes to this property will trigger replacement. List<String>
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.
leafCertificate Changes to this property will trigger replacement. String
The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
name Changes to this property will trigger replacement. String
The name of the certificate for identification.
notAfter String
The expiration date of the certificate
privateKey Changes to this property will trigger replacement. String
The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
sha1Fingerprint String
The SHA-1 fingerprint of the certificate
state String
type Changes to this property will trigger replacement. String | "lets_encrypt" | "custom"
The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
uuid String
The UUID of the certificate

Supporting Types

CertificateType
, CertificateTypeArgs

LetsEncrypt
lets_encrypt
Custom
custom
CertificateTypeLetsEncrypt
lets_encrypt
CertificateTypeCustom
custom
LetsEncrypt
lets_encrypt
Custom
custom
LetsEncrypt
lets_encrypt
Custom
custom
LETS_ENCRYPT
lets_encrypt
CUSTOM
custom
"lets_encrypt"
lets_encrypt
"custom"
custom

Import

Certificates can be imported using the certificate name, e.g.

$ pulumi import digitalocean:index/certificate:Certificate mycertificate cert-01
Copy

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

Package Details

Repository
DigitalOcean pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.