Skip to content

Commit ecd0b53

Browse files
committed
Update README
1 parent db9d7a0 commit ecd0b53

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

.editorconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,3 @@ indent_style = space
2121
[*.md]
2222
max_line_length = 0
2323
trim_trailing_whitespace = false
24-
25-
[Makefile]
26-
tab_width = 2
27-
indent_style = tab
28-
29-
[COMMIT_EDITMSG]
30-
max_line_length = 0

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
# AWS S3 Static Website
1+
# AWS S3 Static Website Terraform Module
22

3-
Terraform Module for an Amazon S3 Static Website.
3+
Terraform Module for an Amazon S3 Static Website, fronted by a CloundFront Distribution.
44

55
## Features
66

7-
TK
7+
This module allows for [Hosting a Static Website on Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html), provisioning the following:
8+
9+
- S3 Bucket for static public files
10+
- CloudFront Distribution fronting the S3 Bucket
11+
- Route 53 Record Set aliased to the CloudFront Distribution
12+
13+
It requires (for now?) that the following have been setup outside this module:
14+
15+
- SSL Certificate
16+
- Route 53 Hosted Zone
817

918
## Usage
1019

@@ -26,10 +35,23 @@ module "static_website" {
2635

2736
## Inputs
2837

29-
TK
38+
| Name | Description | Type | Default | Required |
39+
|------|-------------|:----:|:-------:|:--------:|
40+
| cert_arn | The ARN of the SSL Certificate to use for this domain | string | - | yes |
41+
| domain_name | Domain name for the S3 Static Website | string | - | yes |
42+
| redirects | Optional list of domains that should redirect to `domain_name` (i.e. for redirecting naked domain to www-version) | list | `<list>` | no |
43+
| secret | Random alphanumeric string for allowing CloudFront Distribution's traffic to S3 | string | - | yes |
44+
| tags | A mapping of tags to assign to each resource (S3 and CloudFront) | map | `<map>` | no |
45+
| zone_id | The Route 53 Zone ID in which to create the record set | string | - | yes |
46+
47+
## Outputs
48+
49+
| Name | Description |
50+
|------|-------------|
51+
| cdn_domain_name | Domain name of the Cloudfront Distribution |
3052

3153
## TODO
3254

3355
- [ ] Expose more configuration of resources, esp. Cloudfront dist.
3456
- [ ] Better way to pass in SSL cert, Hosted Zone ID, etc.
35-
- [ ] Better way to implement Cloudfront-to-S3 access than secret?
57+
- [ ] Add more outputs.

0 commit comments

Comments
 (0)