You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform module which provision required AWS resources to host a performant and secured static website.
6
6
@@ -15,8 +15,7 @@ This Terraform module creates the following AWS resources:
15
15
* Bucket #3: to redirect a different subdomain to the main domain (e.g., `www.example.com` redirected to `example.com`).
16
16
***CloudFront**
17
17
* Distribution #1: to frontend the website.
18
-
* Distribution #2: to frontend the subdomain that will be redirect to the main domain.
19
-
***Lambda@Edge** (triggered by the CloudFront Distribution) to re-write requests so that CloudFront requests a default index object (e.g., index.html) for subfolders.
18
+
* Distribution #2: to frontend the subdomain that will be redirected to the main domain.
20
19
***Route53** record sets pointing to the two CloudFront distributions.
21
20
22
21
## Requirements
@@ -44,10 +43,9 @@ module "aws_static_website" {
44
43
45
44
Although AWS services are available in many locations, some of them require the `us-east-1` (N. Virginia) region to be configured:
46
45
47
-
* To use an ACM certificate with Amazon CloudFront, you must request or import the certificate in the US East (N. Virginia) region. ACM certificates in this region that are associated with a CloudFront distribution are distributed to all the geographic locations configured for that distribution.
48
-
* Lambda@Edge functions can now be authored in US East (N. Virginia), and will be replicated globally for invocation in response to CloudFront events.
46
+
* To use an ACM certificate with Amazon CloudFront, you must request or import the certificate in the US East (N. Virginia) region. ACM certificates in this region associated with a CloudFront distribution are distributed to all the geographic locations configured for that distribution.
49
47
50
-
For those reasons, the module includes an aliased provider definition to create those resources in the `us-east-1` region. Remaining resources from the module will inherit default (un-aliased) provider configurations from the parent.
48
+
For that reason, the module includes an aliased provider definition to create supplemental resources in the `us-east-1` region when required. Remaining resources from the module will inherit default (un-aliased) provider configurations from the parent.
51
49
52
50
## Inputs
53
51
@@ -61,3 +59,12 @@ For those reasons, the module includes an aliased provider definition to create
61
59
| Name | Description |
62
60
|------|-------------|
63
61
| website_cdn_root_id | CloudFront Distribution ID |
62
+
63
+
## Additional Resources
64
+
65
+
* Blog post describing the thought process behind this: [My Wordpress to Hugo Migration #2 - Hosting](https://cloudmaniac.net/wordpress-to-hugo-migration-2-hosting/)
66
+
67
+
## Todo
68
+
69
+
* Tag all ressources
70
+
* Optional enhanced version with Lambda@Edge configuration and S3 endpoint (REST endpoint) used as the origin
0 commit comments