Skip to content

Instantly share code, notes, and snippets.

@wkharold
Created September 13, 2018 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wkharold/8923ae7c1c0373d16cb6787124fef37c to your computer and use it in GitHub Desktop.
Save wkharold/8923ae7c1c0373d16cb6787124fef37c to your computer and use it in GitHub Desktop.
provider "acme" {
server_url = "https://acme-staging-v02.api.letsencrypt.org/directory"
}
resource "tls_private_key" "private_key" {
algorithm = "RSA"
}
resource "acme_registration" "reg" {
account_key_pem = "${tls_private_key.private_key.private_key_pem}"
email_address = "me@gmail.com"
}
resource "acme_certificate" "certificate" {
account_key_pem = "${acme_registration.reg.account_key_pem}"
common_name = "my.host.nm"
dns_challenge {
provider = "gcloud"
config {
GCE_PROJECT = "my-project"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment