proxmoxve.Certifi
Explore with Pulumi AI

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.
- Node
Name string A node name.
- Private
Key string The PEM encoded private key.
- Certificate
Chain string The PEM encoded certificate chain.
- Overwrite bool
Whether to overwrite an existing certificate
- Certificate string
The PEM encoded certificate.
- Node
Name string A node name.
- Private
Key string The PEM encoded private key.
- Certificate
Chain string The PEM encoded certificate chain.
- Overwrite bool
Whether to overwrite an existing certificate
- certificate String
The PEM encoded certificate.
- node
Name String A node name.
- private
Key String The PEM encoded private key.
- certificate
Chain String The PEM encoded certificate chain.
- overwrite Boolean
Whether to overwrite an existing certificate
- certificate string
The PEM encoded certificate.
- node
Name string A node name.
- private
Key string The PEM encoded private key.
- certificate
Chain 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.
- node
Name String A node name.
- private
Key String The PEM encoded private key.
- certificate
Chain 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:
- Expiration
Date string The expiration date (RFC 3339).
- File
Name string The file name.
- Id string
The provider-assigned unique ID for this managed resource.
- Issuer string
The issuer.
- Public
Key intSize The public key size.
- Public
Key stringType The public key type.
- Ssl
Fingerprint string The SSL fingerprint.
- Start
Date string The start date (RFC 3339).
- Subject string
The subject.
- Subject
Alternative List<string>Names The subject alternative names.
- Expiration
Date string The expiration date (RFC 3339).
- File
Name string The file name.
- Id string
The provider-assigned unique ID for this managed resource.
- Issuer string
The issuer.
- Public
Key intSize The public key size.
- Public
Key stringType The public key type.
- Ssl
Fingerprint string The SSL fingerprint.
- Start
Date string The start date (RFC 3339).
- Subject string
The subject.
- Subject
Alternative []stringNames The subject alternative names.
- expiration
Date String The expiration date (RFC 3339).
- file
Name String The file name.
- id String
The provider-assigned unique ID for this managed resource.
- issuer String
The issuer.
- public
Key IntegerSize The public key size.
- public
Key StringType The public key type.
- ssl
Fingerprint String The SSL fingerprint.
- start
Date String The start date (RFC 3339).
- subject String
The subject.
- subject
Alternative List<String>Names The subject alternative names.
- expiration
Date string The expiration date (RFC 3339).
- file
Name string The file name.
- id string
The provider-assigned unique ID for this managed resource.
- issuer string
The issuer.
- public
Key numberSize The public key size.
- public
Key stringType The public key type.
- ssl
Fingerprint string The SSL fingerprint.
- start
Date string The start date (RFC 3339).
- subject string
The subject.
- subject
Alternative string[]Names 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_ intsize The public key size.
- public_
key_ strtype The public key type.
- ssl_
fingerprint str The SSL fingerprint.
- start_
date str The start date (RFC 3339).
- subject str
The subject.
- subject_
alternative_ Sequence[str]names The subject alternative names.
- expiration
Date String The expiration date (RFC 3339).
- file
Name String The file name.
- id String
The provider-assigned unique ID for this managed resource.
- issuer String
The issuer.
- public
Key NumberSize The public key size.
- public
Key StringType The public key type.
- ssl
Fingerprint String The SSL fingerprint.
- start
Date String The start date (RFC 3339).
- subject String
The subject.
- subject
Alternative List<String>Names 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.
- Certificate string
The PEM encoded certificate.
- Certificate
Chain string The PEM encoded certificate chain.
- Expiration
Date string The expiration date (RFC 3339).
- File
Name string The file name.
- Issuer string
The issuer.
- Node
Name string A node name.
- Overwrite bool
Whether to overwrite an existing certificate
- Private
Key string The PEM encoded private key.
- Public
Key intSize The public key size.
- Public
Key stringType The public key type.
- Ssl
Fingerprint string The SSL fingerprint.
- Start
Date string The start date (RFC 3339).
- Subject string
The subject.
- Subject
Alternative List<string>Names The subject alternative names.
- Certificate string
The PEM encoded certificate.
- Certificate
Chain string The PEM encoded certificate chain.
- Expiration
Date string The expiration date (RFC 3339).
- File
Name string The file name.
- Issuer string
The issuer.
- Node
Name string A node name.
- Overwrite bool
Whether to overwrite an existing certificate
- Private
Key string The PEM encoded private key.
- Public
Key intSize The public key size.
- Public
Key stringType The public key type.
- Ssl
Fingerprint string The SSL fingerprint.
- Start
Date string The start date (RFC 3339).
- Subject string
The subject.
- Subject
Alternative []stringNames The subject alternative names.
- certificate String
The PEM encoded certificate.
- certificate
Chain String The PEM encoded certificate chain.
- expiration
Date String The expiration date (RFC 3339).
- file
Name String The file name.
- issuer String
The issuer.
- node
Name String A node name.
- overwrite Boolean
Whether to overwrite an existing certificate
- private
Key String The PEM encoded private key.
- public
Key IntegerSize The public key size.
- public
Key StringType The public key type.
- ssl
Fingerprint String The SSL fingerprint.
- start
Date String The start date (RFC 3339).
- subject String
The subject.
- subject
Alternative List<String>Names The subject alternative names.
- certificate string
The PEM encoded certificate.
- certificate
Chain string The PEM encoded certificate chain.
- expiration
Date string The expiration date (RFC 3339).
- file
Name string The file name.
- issuer string
The issuer.
- node
Name string A node name.
- overwrite boolean
Whether to overwrite an existing certificate
- private
Key string The PEM encoded private key.
- public
Key numberSize The public key size.
- public
Key stringType The public key type.
- ssl
Fingerprint string The SSL fingerprint.
- start
Date string The start date (RFC 3339).
- subject string
The subject.
- subject
Alternative string[]Names 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_ intsize The public key size.
- public_
key_ strtype The public key type.
- ssl_
fingerprint str The SSL fingerprint.
- start_
date str The start date (RFC 3339).
- subject str
The subject.
- subject_
alternative_ Sequence[str]names The subject alternative names.
- certificate String
The PEM encoded certificate.
- certificate
Chain String The PEM encoded certificate chain.
- expiration
Date String The expiration date (RFC 3339).
- file
Name String The file name.
- issuer String
The issuer.
- node
Name String A node name.
- overwrite Boolean
Whether to overwrite an existing certificate
- private
Key String The PEM encoded private key.
- public
Key NumberSize The public key size.
- public
Key StringType The public key type.
- ssl
Fingerprint String The SSL fingerprint.
- start
Date String The start date (RFC 3339).
- subject String
The subject.
- subject
Alternative List<String>Names 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.
