feat(tf): acme provider

This commit is contained in:
arcnmx 2024-01-23 09:06:04 -08:00
parent 89d63a4085
commit 31528db499
5 changed files with 79 additions and 5 deletions

22
tf/acme_provider.tf Normal file
View file

@ -0,0 +1,22 @@
variable "acme_account_email" {
type = string
}
provider "acme" {
server_url = "https://acme-v02.api.letsencrypt.org/directory"
}
resource "tls_private_key" "acme_account_key" {
algorithm = "ECDSA"
ecdsa_curve = "P384"
}
resource "acme_registration" "account" {
account_key_pem = tls_private_key.acme_account_key.private_key_pem
email_address = var.acme_account_email
}
output "acme_account_key" {
sensitive = true
value = tls_private_key.acme_account_key.private_key_pem
}