blog-rekahsoft-ca/infra
Collin J. Doering 7116e5e16f
Redirect naked domain to www when enable_naked_domain=false
Adds the variables:

- `enable_naked_domain`

  Whether or not to enable access to the site only via a naked domain.

  When `enable_naked_domain=true`:

  - This corresponds to the previous configuration.

  When `enable_naked_domain=false`:

  - Sets the domain_name to the www version of the domain and adds the naked domain as a
    SAN (Subject Alternative Name) on the ACM certificate
  - Create dns validation records for both the naked domain and www domain
  - Creates a s3 bucket with redirect policy which redirects all requests to the www version
    of the site
  - Creates a cloudfront web distribution with a custom origin of the website bucket
    url (this is required as s3 origins do not handle redirects)

- `subdomain`

  The subdomain to use under the `dns_apex`, eg `<subdomain>.<dns_apex>`. Defaults to empty.
  Remember, `dns_apex` must correspond to a route53 public hosted zone.

Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
2018-12-08 11:31:44 -05:00
..
templates Site infrastructure and deployment now managed with terraform 2018-07-15 03:01:18 -04:00
main.tf Redirect naked domain to www when enable_naked_domain=false 2018-12-08 11:31:44 -05:00
outputs.tf Site infrastructure and deployment now managed with terraform 2018-07-15 03:01:18 -04:00
production.tfvars Redirect naked domain to www when enable_naked_domain=false 2018-12-08 11:31:44 -05:00
variables.tf Redirect naked domain to www when enable_naked_domain=false 2018-12-08 11:31:44 -05:00