You will need to use the ACME Provider as outlined here: https://registry.terraform.io/providers/vancluever/acme/latest

However, there are some changes that are needed from that providers documentation.


Foreword: Route53 DNS Provider

I’m using AWS Route53 as my DNS provider so

provider.tf

terraform {
    required_providers {
        aws = {
            version = "~> 3.0"
            source = "hashicorp/aws"
        }
        acme = {
            source  = "vancluever/acme"
            version = "~> 2.0"
        }
        local = {
            source = "hashicorp/local"
            version = "2.2.2"
        }
    }
}

variables.tf

variable "AWS_ACCESS_KEY" {
    type    = string
}

variable "AWS_SECRET_ACCESS_KEY" {
    type    = string
}

locals {
    env     = "${terraform.workspace}"
    domain  = "${local.env}.${lookup(local.domains,local.env)}"
    email   = "something@example.com"
    domains = {
        "production"     = "example.com"
    }
}
Jacob
Jacob

Something About Me With Multiple Lines And Markdown