1. Packages
  2. DigitalOcean
  3. API Docs
  4. Certificate
DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi

digitalocean.Certificate

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi

    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 fs from "fs";
    
    const cert = new digitalocean.Certificate("cert", {
        type: "custom",
        privateKey: fs.readFileSync("/Users/myuser/certs/privkey.pem", "utf8"),
        leafCertificate: fs.readFileSync("/Users/myuser/certs/cert.pem", "utf8"),
        certificateChain: fs.readFileSync("/Users/myuser/certs/fullchain.pem", "utf8"),
    });
    
    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"))
    
    package main
    
    import (
    	"os"
    
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := digitalocean.NewCertificate(ctx, "cert", &digitalocean.CertificateArgs{
    			Type:             pulumi.String("custom"),
    			PrivateKey:       readFileOrPanic("/Users/myuser/certs/privkey.pem"),
    			LeafCertificate:  readFileOrPanic("/Users/myuser/certs/cert.pem"),
    			CertificateChain: readFileOrPanic("/Users/myuser/certs/fullchain.pem"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var cert = new DigitalOcean.Certificate("cert", new()
        {
            Type = "custom",
            PrivateKey = File.ReadAllText("/Users/myuser/certs/privkey.pem"),
            LeafCertificate = File.ReadAllText("/Users/myuser/certs/cert.pem"),
            CertificateChain = File.ReadAllText("/Users/myuser/certs/fullchain.pem"),
        });
    
    });
    
    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()        
                .type("custom")
                .privateKey(Files.readString(Paths.get("/Users/myuser/certs/privkey.pem")))
                .leafCertificate(Files.readString(Paths.get("/Users/myuser/certs/cert.pem")))
                .certificateChain(Files.readString(Paths.get("/Users/myuser/certs/fullchain.pem")))
                .build());
    
        }
    }
    
    resources:
      cert:
        type: digitalocean:Certificate
        properties:
          type: custom
          privateKey:
            fn::readFile: /Users/myuser/certs/privkey.pem
          leafCertificate:
            fn::readFile: /Users/myuser/certs/cert.pem
          certificateChain:
            fn::readFile: /Users/myuser/certs/fullchain.pem
    

    Let’s Encrypt Certificate

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const cert = new digitalocean.Certificate("cert", {
        domains: ["example.com"],
        type: "lets_encrypt",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    cert = digitalocean.Certificate("cert",
        domains=["example.com"],
        type="lets_encrypt")
    
    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{
    			Domains: pulumi.StringArray{
    				pulumi.String("example.com"),
    			},
    			Type: pulumi.String("lets_encrypt"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var cert = new DigitalOcean.Certificate("cert", new()
        {
            Domains = new[]
            {
                "example.com",
            },
            Type = "lets_encrypt",
        });
    
    });
    
    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()        
                .domains("example.com")
                .type("lets_encrypt")
                .build());
    
        }
    }
    
    resources:
      cert:
        type: digitalocean:Certificate
        properties:
          domains:
            - example.com
          type: lets_encrypt
    

    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", {
        type: "lets_encrypt",
        domains: ["example.com"],
    });
    // Create a new Load Balancer with TLS termination
    const _public = new digitalocean.LoadBalancer("public", {
        region: "nyc3",
        dropletTag: "backend",
        forwardingRules: [{
            entryPort: 443,
            entryProtocol: "https",
            targetPort: 80,
            targetProtocol: "http",
            certificateName: cert.name,
        }],
    });
    
    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_rules=[digitalocean.LoadBalancerForwardingRuleArgs(
            entry_port=443,
            entry_protocol="https",
            target_port=80,
            target_protocol="http",
            certificate_name=cert.name,
        )])
    
    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{
    			Type: pulumi.String("lets_encrypt"),
    			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{
    			Region:     pulumi.String("nyc3"),
    			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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var cert = new DigitalOcean.Certificate("cert", new()
        {
            Type = "lets_encrypt",
            Domains = new[]
            {
                "example.com",
            },
        });
    
        // Create a new Load Balancer with TLS termination
        var @public = new DigitalOcean.LoadBalancer("public", new()
        {
            Region = "nyc3",
            DropletTag = "backend",
            ForwardingRules = new[]
            {
                new DigitalOcean.Inputs.LoadBalancerForwardingRuleArgs
                {
                    EntryPort = 443,
                    EntryProtocol = "https",
                    TargetPort = 80,
                    TargetProtocol = "http",
                    CertificateName = cert.Name,
                },
            },
        });
    
    });
    
    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()        
                .type("lets_encrypt")
                .domains("example.com")
                .build());
    
            var public_ = new LoadBalancer("public", LoadBalancerArgs.builder()        
                .region("nyc3")
                .dropletTag("backend")
                .forwardingRules(LoadBalancerForwardingRuleArgs.builder()
                    .entryPort(443)
                    .entryProtocol("https")
                    .targetPort(80)
                    .targetProtocol("http")
                    .certificateName(cert.name())
                    .build())
                .build());
    
        }
    }
    
    resources:
      cert:
        type: digitalocean:Certificate
        properties:
          type: lets_encrypt
          domains:
            - example.com
      # Create a new Load Balancer with TLS termination
      public:
        type: digitalocean:LoadBalancer
        properties:
          region: nyc3
          dropletTag: backend
          forwardingRules:
            - entryPort: 443
              entryProtocol: https
              targetPort: 80
              targetProtocol: http
              certificateName: ${cert.name}
    

    Create Certificate Resource

    new Certificate(name: string, args?: CertificateArgs, opts?: CustomResourceOptions);
    @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)
    @overload
    def Certificate(resource_name: str,
                    args: Optional[CertificateArgs] = None,
                    opts: Optional[ResourceOptions] = 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.
    
    
    name 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 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 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 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 String
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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

    The Certificate resource accepts the following input properties:

    CertificateChain 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 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 string
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    Name string
    The name of the certificate for identification.
    PrivateKey string
    The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
    Type string | Pulumi.DigitalOcean.CertificateType
    The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
    CertificateChain 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 []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 string
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    Name string
    The name of the certificate for identification.
    PrivateKey string
    The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
    Type string | CertificateType
    The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
    certificateChain 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 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 String
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    name String
    The name of the certificate for identification.
    privateKey String
    The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
    type String | CertificateType
    The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
    certificateChain 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 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 string
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    name string
    The name of the certificate for identification.
    privateKey string
    The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
    type string | CertificateType
    The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
    certificate_chain 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 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 str
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    name str
    The name of the certificate for identification.
    private_key str
    The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
    type str | CertificateType
    The type of certificate to provision. Can be either custom or lets_encrypt. Defaults to custom.
    certificateChain 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 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 String
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    name String
    The name of the certificate for identification.
    privateKey String
    The contents of a PEM-formatted private-key corresponding to the SSL certificate. Only valid when type is custom.
    type 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CertificateChain 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 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 string
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    Name string
    The name of the certificate for identification.
    NotAfter string
    The expiration date of the certificate
    PrivateKey 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 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 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 []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 string
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    Name string
    The name of the certificate for identification.
    NotAfter string
    The expiration date of the certificate
    PrivateKey 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 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 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 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 String
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    name String
    The name of the certificate for identification.
    notAfter String
    The expiration date of the certificate
    privateKey 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 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 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 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 string
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    name string
    The name of the certificate for identification.
    notAfter string
    The expiration date of the certificate
    privateKey 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 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 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 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 str
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    name str
    The name of the certificate for identification.
    not_after str
    The expiration date of the certificate
    private_key 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 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 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 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 String
    The contents of a PEM-formatted public TLS certificate. Only valid when type is custom.
    name String
    The name of the certificate for identification.
    notAfter String
    The expiration date of the certificate
    privateKey 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 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
    

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi