0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-01 11:02:59 +00:00
terraform-provider-proxmox/docs/resources/virtual_environment_certificate.md
Pavel Boldyrev bf9e31ecfc
chore: lint and reformat the code (#204)
* chore: reformat code

* chore: add commitlint config

* reformat README.md

* add linter config

* lint & reformat docs

* go linter: only new issues

* fix some linting errors

* more reformatting

* disable linter warning for some duplicated code
2023-01-16 18:07:30 -05:00

1.8 KiB

layout title permalink nav_order parent subcategory
page proxmox_virtual_environment_certificate /resources/virtual_environment_certificate 1 Resources Virtual Environment

Resource: proxmox_virtual_environment_certificate

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

Example Usage

resource "proxmox_virtual_environment_certificate" "example" {
  certificate = tls_self_signed_cert.proxmox_virtual_environment_certificate.cert_pem
  node_name   = "first-node"
  private_key = tls_private_key.proxmox_virtual_environment_certificate.private_key_pem
}

resource "tls_private_key" "proxmox_virtual_environment_certificate" {
  algorithm = "RSA"
  rsa_bits  = 2048
}

resource "tls_self_signed_cert" "proxmox_virtual_environment_certificate" {
  key_algorithm   = tls_private_key.proxmox_virtual_environment_certificate.algorithm
  private_key_pem = tls_private_key.proxmox_virtual_environment_certificate.private_key_pem

  subject {
    common_name  = "example.com"
    organization = "Terraform Provider for Proxmox"
  }

  validity_period_hours = 8760

  allowed_uses = [
    "key_encipherment",
    "digital_signature",
    "server_auth",
  ]
}

Argument Reference

  • certificate - (Required) The PEM encoded certificate.
  • certificate_chain - (Optional) The PEM encoded certificate chain.
  • node_name - (Required) A node name.
  • private_key - (Required) The PEM encoded private key.

Attribute Reference

  • expiration_date - The expiration date (RFC 3339).
  • file_name - The file name.
  • issuer - The issuer.
  • public_key_size - The public key size.
  • public_key_type - The public key type.
  • ssl_fingerprint - The SSL fingerprint.
  • start_date - The start date (RFC 3339).
  • subject - The subject.
  • subject_alternative_names - The subject alternative names.