Generate LetsEncrypt certificates for AWS(Route 53) hosted domain using Terraform.!
-
Install Terraform v11.6
-
Create a user on AWS with the set of permissions attached AmazonRoute53FullAccess, AWSCertificateManagerFullAccess, Route53CreateHostedZone
-
Install and setup AWS CLI, ensure AWS credentials are in place
-
Update DOMAIN and domain ADMINISTRATOR_EMAIL in
variables.tf
-
Run
terraform init
to initialize the working directory, runterraform plan
to create an execution plan and finally runterraform apply
to generate desired output.terraform init terraform plan terraform apply
-
It will take a few minutes to create certificates. Once complete, your certificates will be stored in
certificates.tf
file.