Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
conortm committed Aug 27, 2018
1 parent db9d7a0 commit ecd0b53
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
7 changes: 0 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,3 @@ indent_style = space
[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[Makefile]
tab_width = 2
indent_style = tab

[COMMIT_EDITMSG]
max_line_length = 0
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# AWS S3 Static Website
# AWS S3 Static Website Terraform Module

Terraform Module for an Amazon S3 Static Website.
Terraform Module for an Amazon S3 Static Website, fronted by a CloundFront Distribution.

## Features

TK
This module allows for [Hosting a Static Website on Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html), provisioning the following:

- S3 Bucket for static public files
- CloudFront Distribution fronting the S3 Bucket
- Route 53 Record Set aliased to the CloudFront Distribution

It requires (for now?) that the following have been setup outside this module:

- SSL Certificate
- Route 53 Hosted Zone

## Usage

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

## Inputs

TK
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-------:|:--------:|
| cert_arn | The ARN of the SSL Certificate to use for this domain | string | - | yes |
| domain_name | Domain name for the S3 Static Website | string | - | yes |
| redirects | Optional list of domains that should redirect to `domain_name` (i.e. for redirecting naked domain to www-version) | list | `<list>` | no |
| secret | Random alphanumeric string for allowing CloudFront Distribution's traffic to S3 | string | - | yes |
| tags | A mapping of tags to assign to each resource (S3 and CloudFront) | map | `<map>` | no |
| zone_id | The Route 53 Zone ID in which to create the record set | string | - | yes |

## Outputs

| Name | Description |
|------|-------------|
| cdn_domain_name | Domain name of the Cloudfront Distribution |

## TODO

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

0 comments on commit ecd0b53

Please sign in to comment.