Skip to content

Latest commit

 

History

History
142 lines (113 loc) · 2.65 KB

digitalocean_certificate.md

File metadata and controls

142 lines (113 loc) · 2.65 KB

digitalocean_certificate

back

Index

Terraform

terraform {
  required_providers {
    digitalocean = ">= 2.7.0"
  }
}

top

Example Usage

module "digitalocean_certificate" {
  source = "./modules/digitalocean/r/digitalocean_certificate"

  # certificate_chain - (optional) is a type of string
  certificate_chain = null
  # domains - (optional) is a type of set of string
  domains = []
  # leaf_certificate - (optional) is a type of string
  leaf_certificate = null
  # name - (required) is a type of string
  name = null
  # private_key - (optional) is a type of string
  private_key = null
  # type - (optional) is a type of string
  type = null
}

top

Variables

variable "certificate_chain" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "domains" {
  description = "(optional)"
  type        = set(string)
  default     = null
}

variable "leaf_certificate" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "name" {
  description = "(required)"
  type        = string
}

variable "private_key" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "type" {
  description = "(optional)"
  type        = string
  default     = null
}

top

Resource

resource "digitalocean_certificate" "this" {
  # certificate_chain - (optional) is a type of string
  certificate_chain = var.certificate_chain
  # domains - (optional) is a type of set of string
  domains = var.domains
  # leaf_certificate - (optional) is a type of string
  leaf_certificate = var.leaf_certificate
  # name - (required) is a type of string
  name = var.name
  # private_key - (optional) is a type of string
  private_key = var.private_key
  # type - (optional) is a type of string
  type = var.type
}

top

Outputs

output "id" {
  description = "returns a string"
  value       = digitalocean_certificate.this.id
}

output "not_after" {
  description = "returns a string"
  value       = digitalocean_certificate.this.not_after
}

output "sha1_fingerprint" {
  description = "returns a string"
  value       = digitalocean_certificate.this.sha1_fingerprint
}

output "state" {
  description = "returns a string"
  value       = digitalocean_certificate.this.state
}

output "uuid" {
  description = "returns a string"
  value       = digitalocean_certificate.this.uuid
}

output "this" {
  value = digitalocean_certificate.this
}

top