1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. Certifi
Proxmox Virtual Environment (Proxmox VE) v5.16.0 published on Wednesday, Nov 22, 2023 by Daniel Muehlbachler-Pietrzykowski

proxmoxve.Certifi

Explore with Pulumi AI

proxmoxve logo
Proxmox Virtual Environment (Proxmox VE) v5.16.0 published on Wednesday, Nov 22, 2023 by Daniel Muehlbachler-Pietrzykowski

    Manages the custom SSL/TLS certificate for a specific node.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ProxmoxVE = Pulumi.ProxmoxVE;
    using Tls = Pulumi.Tls;
    
    return await Deployment.RunAsync(() => 
    {
        var proxmoxVirtualEnvironmentCertificatePrivateKey = new Tls.PrivateKey("proxmoxVirtualEnvironmentCertificatePrivateKey", new()
        {
            Algorithm = "RSA",
            RsaBits = 2048,
        });
    
        var proxmoxVirtualEnvironmentCertificateSelfSignedCert = new Tls.SelfSignedCert("proxmoxVirtualEnvironmentCertificateSelfSignedCert", new()
        {
            KeyAlgorithm = proxmoxVirtualEnvironmentCertificatePrivateKey.Algorithm,
            PrivateKeyPem = proxmoxVirtualEnvironmentCertificatePrivateKey.PrivateKeyPem,
            Subject = new Tls.Inputs.SelfSignedCertSubjectArgs
            {
                CommonName = "example.com",
                Organization = "Terraform Provider for Proxmox",
            },
            ValidityPeriodHours = 8760,
            AllowedUses = new[]
            {
                "key_encipherment",
                "digital_signature",
                "server_auth",
            },
        });
    
        var example = new ProxmoxVE.Certifi("example", new()
        {
            Certificate = proxmoxVirtualEnvironmentCertificateSelfSignedCert.CertPem,
            NodeName = "first-node",
            PrivateKey = proxmoxVirtualEnvironmentCertificatePrivateKey.PrivateKeyPem,
        });
    
    });
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v5/go/proxmoxve"
    	"github.com/pulumi/pulumi-tls/sdk/v4/go/tls"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		proxmoxVirtualEnvironmentCertificatePrivateKey, err := tls.NewPrivateKey(ctx, "proxmoxVirtualEnvironmentCertificatePrivateKey", &tls.PrivateKeyArgs{
    			Algorithm: pulumi.String("RSA"),
    			RsaBits:   pulumi.Int(2048),
    		})
    		if err != nil {
    			return err
    		}
    		proxmoxVirtualEnvironmentCertificateSelfSignedCert, err := tls.NewSelfSignedCert(ctx, "proxmoxVirtualEnvironmentCertificateSelfSignedCert", &tls.SelfSignedCertArgs{
    			KeyAlgorithm:  proxmoxVirtualEnvironmentCertificatePrivateKey.Algorithm,
    			PrivateKeyPem: proxmoxVirtualEnvironmentCertificatePrivateKey.PrivateKeyPem,
    			Subject: &tls.SelfSignedCertSubjectArgs{
    				CommonName:   pulumi.String("example.com"),
    				Organization: pulumi.String("Terraform Provider for Proxmox"),
    			},
    			ValidityPeriodHours: pulumi.Int(8760),
    			AllowedUses: pulumi.StringArray{
    				pulumi.String("key_encipherment"),
    				pulumi.String("digital_signature"),
    				pulumi.String("server_auth"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = proxmoxve.NewCertifi(ctx, "example", &proxmoxve.CertifiArgs{
    			Certificate: proxmoxVirtualEnvironmentCertificateSelfSignedCert.CertPem,
    			NodeName:    pulumi.String("first-node"),
    			PrivateKey:  proxmoxVirtualEnvironmentCertificatePrivateKey.PrivateKeyPem,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tls.PrivateKey;
    import com.pulumi.tls.PrivateKeyArgs;
    import com.pulumi.tls.SelfSignedCert;
    import com.pulumi.tls.SelfSignedCertArgs;
    import com.pulumi.tls.inputs.SelfSignedCertSubjectArgs;
    import com.pulumi.proxmoxve.Certifi;
    import com.pulumi.proxmoxve.CertifiArgs;
    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 proxmoxVirtualEnvironmentCertificatePrivateKey = new PrivateKey("proxmoxVirtualEnvironmentCertificatePrivateKey", PrivateKeyArgs.builder()        
                .algorithm("RSA")
                .rsaBits(2048)
                .build());
    
            var proxmoxVirtualEnvironmentCertificateSelfSignedCert = new SelfSignedCert("proxmoxVirtualEnvironmentCertificateSelfSignedCert", SelfSignedCertArgs.builder()        
                .keyAlgorithm(proxmoxVirtualEnvironmentCertificatePrivateKey.algorithm())
                .privateKeyPem(proxmoxVirtualEnvironmentCertificatePrivateKey.privateKeyPem())
                .subject(SelfSignedCertSubjectArgs.builder()
                    .commonName("example.com")
                    .organization("Terraform Provider for Proxmox")
                    .build())
                .validityPeriodHours(8760)
                .allowedUses(            
                    "key_encipherment",
                    "digital_signature",
                    "server_auth")
                .build());
    
            var example = new Certifi("example", CertifiArgs.builder()        
                .certificate(proxmoxVirtualEnvironmentCertificateSelfSignedCert.certPem())
                .nodeName("first-node")
                .privateKey(proxmoxVirtualEnvironmentCertificatePrivateKey.privateKeyPem())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    import pulumi_tls as tls
    
    proxmox_virtual_environment_certificate_private_key = tls.PrivateKey("proxmoxVirtualEnvironmentCertificatePrivateKey",
        algorithm="RSA",
        rsa_bits=2048)
    proxmox_virtual_environment_certificate_self_signed_cert = tls.SelfSignedCert("proxmoxVirtualEnvironmentCertificateSelfSignedCert",
        key_algorithm=proxmox_virtual_environment_certificate_private_key.algorithm,
        private_key_pem=proxmox_virtual_environment_certificate_private_key.private_key_pem,
        subject=tls.SelfSignedCertSubjectArgs(
            common_name="example.com",
            organization="Terraform Provider for Proxmox",
        ),
        validity_period_hours=8760,
        allowed_uses=[
            "key_encipherment",
            "digital_signature",
            "server_auth",
        ])
    example = proxmoxve.Certifi("example",
        certificate=proxmox_virtual_environment_certificate_self_signed_cert.cert_pem,
        node_name="first-node",
        private_key=proxmox_virtual_environment_certificate_private_key.private_key_pem)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    import * as tls from "@pulumi/tls";
    
    const proxmoxVirtualEnvironmentCertificatePrivateKey = new tls.PrivateKey("proxmoxVirtualEnvironmentCertificatePrivateKey", {
        algorithm: "RSA",
        rsaBits: 2048,
    });
    const proxmoxVirtualEnvironmentCertificateSelfSignedCert = new tls.SelfSignedCert("proxmoxVirtualEnvironmentCertificateSelfSignedCert", {
        keyAlgorithm: proxmoxVirtualEnvironmentCertificatePrivateKey.algorithm,
        privateKeyPem: proxmoxVirtualEnvironmentCertificatePrivateKey.privateKeyPem,
        subject: {
            commonName: "example.com",
            organization: "Terraform Provider for Proxmox",
        },
        validityPeriodHours: 8760,
        allowedUses: [
            "key_encipherment",
            "digital_signature",
            "server_auth",
        ],
    });
    const example = new proxmoxve.Certifi("example", {
        certificate: proxmoxVirtualEnvironmentCertificateSelfSignedCert.certPem,
        nodeName: "first-node",
        privateKey: proxmoxVirtualEnvironmentCertificatePrivateKey.privateKeyPem,
    });
    
    resources:
      example:
        type: proxmoxve:Certifi
        properties:
          certificate: ${proxmoxVirtualEnvironmentCertificateSelfSignedCert.certPem}
          nodeName: first-node
          privateKey: ${proxmoxVirtualEnvironmentCertificatePrivateKey.privateKeyPem}
      proxmoxVirtualEnvironmentCertificatePrivateKey:
        type: tls:PrivateKey
        properties:
          algorithm: RSA
          rsaBits: 2048
      proxmoxVirtualEnvironmentCertificateSelfSignedCert:
        type: tls:SelfSignedCert
        properties:
          keyAlgorithm: ${proxmoxVirtualEnvironmentCertificatePrivateKey.algorithm}
          privateKeyPem: ${proxmoxVirtualEnvironmentCertificatePrivateKey.privateKeyPem}
          subject:
            commonName: example.com
            organization: Terraform Provider for Proxmox
          validityPeriodHours: 8760
          allowedUses:
            - key_encipherment
            - digital_signature
            - server_auth
    

    Create Certifi Resource

    new Certifi(name: string, args: CertifiArgs, opts?: CustomResourceOptions);
    @overload
    def Certifi(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                certificate: Optional[str] = None,
                certificate_chain: Optional[str] = None,
                node_name: Optional[str] = None,
                overwrite: Optional[bool] = None,
                private_key: Optional[str] = None)
    @overload
    def Certifi(resource_name: str,
                args: CertifiArgs,
                opts: Optional[ResourceOptions] = None)
    func NewCertifi(ctx *Context, name string, args CertifiArgs, opts ...ResourceOption) (*Certifi, error)
    public Certifi(string name, CertifiArgs args, CustomResourceOptions? opts = null)
    public Certifi(String name, CertifiArgs args)
    public Certifi(String name, CertifiArgs args, CustomResourceOptions options)
    
    type: proxmoxve:Certifi
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args CertifiArgs
    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 CertifiArgs
    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 CertifiArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CertifiArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CertifiArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Certifi 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 Certifi resource accepts the following input properties:

    Certificate string

    The PEM encoded certificate.

    NodeName string

    A node name.

    PrivateKey string

    The PEM encoded private key.

    CertificateChain string

    The PEM encoded certificate chain.

    Overwrite bool

    Whether to overwrite an existing certificate

    Certificate string

    The PEM encoded certificate.

    NodeName string

    A node name.

    PrivateKey string

    The PEM encoded private key.

    CertificateChain string

    The PEM encoded certificate chain.

    Overwrite bool

    Whether to overwrite an existing certificate

    certificate String

    The PEM encoded certificate.

    nodeName String

    A node name.

    privateKey String

    The PEM encoded private key.

    certificateChain String

    The PEM encoded certificate chain.

    overwrite Boolean

    Whether to overwrite an existing certificate

    certificate string

    The PEM encoded certificate.

    nodeName string

    A node name.

    privateKey string

    The PEM encoded private key.

    certificateChain string

    The PEM encoded certificate chain.

    overwrite boolean

    Whether to overwrite an existing certificate

    certificate str

    The PEM encoded certificate.

    node_name str

    A node name.

    private_key str

    The PEM encoded private key.

    certificate_chain str

    The PEM encoded certificate chain.

    overwrite bool

    Whether to overwrite an existing certificate

    certificate String

    The PEM encoded certificate.

    nodeName String

    A node name.

    privateKey String

    The PEM encoded private key.

    certificateChain String

    The PEM encoded certificate chain.

    overwrite Boolean

    Whether to overwrite an existing certificate

    Outputs

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

    ExpirationDate string

    The expiration date (RFC 3339).

    FileName string

    The file name.

    Id string

    The provider-assigned unique ID for this managed resource.

    Issuer string

    The issuer.

    PublicKeySize int

    The public key size.

    PublicKeyType string

    The public key type.

    SslFingerprint string

    The SSL fingerprint.

    StartDate string

    The start date (RFC 3339).

    Subject string

    The subject.

    SubjectAlternativeNames List<string>

    The subject alternative names.

    ExpirationDate string

    The expiration date (RFC 3339).

    FileName string

    The file name.

    Id string

    The provider-assigned unique ID for this managed resource.

    Issuer string

    The issuer.

    PublicKeySize int

    The public key size.

    PublicKeyType string

    The public key type.

    SslFingerprint string

    The SSL fingerprint.

    StartDate string

    The start date (RFC 3339).

    Subject string

    The subject.

    SubjectAlternativeNames []string

    The subject alternative names.

    expirationDate String

    The expiration date (RFC 3339).

    fileName String

    The file name.

    id String

    The provider-assigned unique ID for this managed resource.

    issuer String

    The issuer.

    publicKeySize Integer

    The public key size.

    publicKeyType String

    The public key type.

    sslFingerprint String

    The SSL fingerprint.

    startDate String

    The start date (RFC 3339).

    subject String

    The subject.

    subjectAlternativeNames List<String>

    The subject alternative names.

    expirationDate string

    The expiration date (RFC 3339).

    fileName string

    The file name.

    id string

    The provider-assigned unique ID for this managed resource.

    issuer string

    The issuer.

    publicKeySize number

    The public key size.

    publicKeyType string

    The public key type.

    sslFingerprint string

    The SSL fingerprint.

    startDate string

    The start date (RFC 3339).

    subject string

    The subject.

    subjectAlternativeNames string[]

    The subject alternative names.

    expiration_date str

    The expiration date (RFC 3339).

    file_name str

    The file name.

    id str

    The provider-assigned unique ID for this managed resource.

    issuer str

    The issuer.

    public_key_size int

    The public key size.

    public_key_type str

    The public key type.

    ssl_fingerprint str

    The SSL fingerprint.

    start_date str

    The start date (RFC 3339).

    subject str

    The subject.

    subject_alternative_names Sequence[str]

    The subject alternative names.

    expirationDate String

    The expiration date (RFC 3339).

    fileName String

    The file name.

    id String

    The provider-assigned unique ID for this managed resource.

    issuer String

    The issuer.

    publicKeySize Number

    The public key size.

    publicKeyType String

    The public key type.

    sslFingerprint String

    The SSL fingerprint.

    startDate String

    The start date (RFC 3339).

    subject String

    The subject.

    subjectAlternativeNames List<String>

    The subject alternative names.

    Look up Existing Certifi Resource

    Get an existing Certifi 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?: CertifiState, opts?: CustomResourceOptions): Certifi
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certificate: Optional[str] = None,
            certificate_chain: Optional[str] = None,
            expiration_date: Optional[str] = None,
            file_name: Optional[str] = None,
            issuer: Optional[str] = None,
            node_name: Optional[str] = None,
            overwrite: Optional[bool] = None,
            private_key: Optional[str] = None,
            public_key_size: Optional[int] = None,
            public_key_type: Optional[str] = None,
            ssl_fingerprint: Optional[str] = None,
            start_date: Optional[str] = None,
            subject: Optional[str] = None,
            subject_alternative_names: Optional[Sequence[str]] = None) -> Certifi
    func GetCertifi(ctx *Context, name string, id IDInput, state *CertifiState, opts ...ResourceOption) (*Certifi, error)
    public static Certifi Get(string name, Input<string> id, CertifiState? state, CustomResourceOptions? opts = null)
    public static Certifi get(String name, Output<String> id, CertifiState 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:
    Certificate string

    The PEM encoded certificate.

    CertificateChain string

    The PEM encoded certificate chain.

    ExpirationDate string

    The expiration date (RFC 3339).

    FileName string

    The file name.

    Issuer string

    The issuer.

    NodeName string

    A node name.

    Overwrite bool

    Whether to overwrite an existing certificate

    PrivateKey string

    The PEM encoded private key.

    PublicKeySize int

    The public key size.

    PublicKeyType string

    The public key type.

    SslFingerprint string

    The SSL fingerprint.

    StartDate string

    The start date (RFC 3339).

    Subject string

    The subject.

    SubjectAlternativeNames List<string>

    The subject alternative names.

    Certificate string

    The PEM encoded certificate.

    CertificateChain string

    The PEM encoded certificate chain.

    ExpirationDate string

    The expiration date (RFC 3339).

    FileName string

    The file name.

    Issuer string

    The issuer.

    NodeName string

    A node name.

    Overwrite bool

    Whether to overwrite an existing certificate

    PrivateKey string

    The PEM encoded private key.

    PublicKeySize int

    The public key size.

    PublicKeyType string

    The public key type.

    SslFingerprint string

    The SSL fingerprint.

    StartDate string

    The start date (RFC 3339).

    Subject string

    The subject.

    SubjectAlternativeNames []string

    The subject alternative names.

    certificate String

    The PEM encoded certificate.

    certificateChain String

    The PEM encoded certificate chain.

    expirationDate String

    The expiration date (RFC 3339).

    fileName String

    The file name.

    issuer String

    The issuer.

    nodeName String

    A node name.

    overwrite Boolean

    Whether to overwrite an existing certificate

    privateKey String

    The PEM encoded private key.

    publicKeySize Integer

    The public key size.

    publicKeyType String

    The public key type.

    sslFingerprint String

    The SSL fingerprint.

    startDate String

    The start date (RFC 3339).

    subject String

    The subject.

    subjectAlternativeNames List<String>

    The subject alternative names.

    certificate string

    The PEM encoded certificate.

    certificateChain string

    The PEM encoded certificate chain.

    expirationDate string

    The expiration date (RFC 3339).

    fileName string

    The file name.

    issuer string

    The issuer.

    nodeName string

    A node name.

    overwrite boolean

    Whether to overwrite an existing certificate

    privateKey string

    The PEM encoded private key.

    publicKeySize number

    The public key size.

    publicKeyType string

    The public key type.

    sslFingerprint string

    The SSL fingerprint.

    startDate string

    The start date (RFC 3339).

    subject string

    The subject.

    subjectAlternativeNames string[]

    The subject alternative names.

    certificate str

    The PEM encoded certificate.

    certificate_chain str

    The PEM encoded certificate chain.

    expiration_date str

    The expiration date (RFC 3339).

    file_name str

    The file name.

    issuer str

    The issuer.

    node_name str

    A node name.

    overwrite bool

    Whether to overwrite an existing certificate

    private_key str

    The PEM encoded private key.

    public_key_size int

    The public key size.

    public_key_type str

    The public key type.

    ssl_fingerprint str

    The SSL fingerprint.

    start_date str

    The start date (RFC 3339).

    subject str

    The subject.

    subject_alternative_names Sequence[str]

    The subject alternative names.

    certificate String

    The PEM encoded certificate.

    certificateChain String

    The PEM encoded certificate chain.

    expirationDate String

    The expiration date (RFC 3339).

    fileName String

    The file name.

    issuer String

    The issuer.

    nodeName String

    A node name.

    overwrite Boolean

    Whether to overwrite an existing certificate

    privateKey String

    The PEM encoded private key.

    publicKeySize Number

    The public key size.

    publicKeyType String

    The public key type.

    sslFingerprint String

    The SSL fingerprint.

    startDate String

    The start date (RFC 3339).

    subject String

    The subject.

    subjectAlternativeNames List<String>

    The subject alternative names.

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the proxmox Terraform Provider.

    proxmoxve logo
    Proxmox Virtual Environment (Proxmox VE) v5.16.0 published on Wednesday, Nov 22, 2023 by Daniel Muehlbachler-Pietrzykowski