Make domain customizable

This commit is contained in:
Radon Rosborough 2021-09-13 21:48:42 -07:00
parent a1815f8dd9
commit 0992a4dc90
2 changed files with 9 additions and 2 deletions

View File

@ -122,6 +122,7 @@ Add to `.env` the following contents:
# Terraform # Terraform
AMI_NAME=riju-web-20210711223158 AMI_NAME=riju-web-20210711223158
AWS_REGION=us-west-1 AWS_REGION=us-west-1
DOMAIN=your.domain
S3_BUCKET=yourname-riju S3_BUCKET=yourname-riju
``` ```
@ -141,6 +142,12 @@ The main utility of having this as an explicit environment variable is
that Terraform respects it and won't always ask you what region to that Terraform respects it and won't always ask you what region to
use. use.
### DOMAIN
This is the base hostname you will be hosting Riju at (e.g.
`riju.codes`). Even if you plan to host on a subdomain of your domain,
set this to the apex. It's just used for TLS certificate provisioning.
### S3\_BUCKET ### S3\_BUCKET
This is the name of the S3 bucket that will be used to store Riju This is the name of the S3 bucket that will be used to store Riju

View File

@ -1,6 +1,6 @@
resource "aws_acm_certificate" "riju" { resource "aws_acm_certificate" "riju" {
domain_name = "riju.codes" domain_name = data.external.env.result.DOMAIN
subject_alternative_names = ["*.riju.codes"] subject_alternative_names = ["*.${data.external.env.result.DOMAIN}"]
validation_method = "DNS" validation_method = "DNS"
tags = { tags = {