Commit Graph

8 Commits

Author SHA1 Message Date
Collin J. Doering d9fc946d33
infra/main.tf: Always trigger deployment of static files upon apply 2019-12-15 21:21:06 -05:00
Collin J. Doering 6fb3d3046b
Add AAAA records for native ipv6 reach-ability
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
2019-10-26 19:53:06 -04:00
Collin J. Doering 9b779ec31b
Upgrade terraform from 0.11.x to 0.12
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
2019-06-13 22:57:31 -04:00
Collin J. Doering 1ee07aab1f
Update terraform providers to the latest version
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
2019-06-13 22:53:47 -04:00
Collin J. Doering e83ccfb521
Use temporary config/credentials files when deploying app
This is primarily useful when testing locally, so that the users aws config/credentials aren't
polluted, and adds little no value otherwise.

Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
2018-12-08 13:06:21 -05:00
Collin J. Doering ac8d11ca8f
Add versions for null, random, and template providers
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
2018-12-08 11:37:42 -05:00
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
Collin J. Doering 186d04041d
Site infrastructure and deployment now managed with terraform
Create a classic static site deployment using cloudfront with a s3 origin. Provision, verify and
utilize a ACM certificate to enable (and force) https for cloudfront.

This assumes that the build resources are available at ./_site as a null_resource is used to
sync it to the s3 origin backing cloudfront. A IAM user and policy is provisioned prior to the
null_resource execution with least privilege access to the s3 bucket.

Note: The required terraform backend resources were manually provisioned.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2018-07-15 03:01:18 -04:00