https://github.com/note/static-website-s3-terraform
Setting up a Static Website on S3 with terraform
https://github.com/note/static-website-s3-terraform
s3 terraform
Last synced: over 1 year ago
JSON representation
Setting up a Static Website on S3 with terraform
- Host: GitHub
- URL: https://github.com/note/static-website-s3-terraform
- Owner: note
- License: mit
- Created: 2018-03-26T10:10:16.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-26T20:01:50.000Z (about 8 years ago)
- Last Synced: 2025-01-12T09:27:08.081Z (over 1 year ago)
- Topics: s3, terraform
- Language: HCL
- Size: 2.49 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a Terraform project that creates Amazon S3 and Amazon Route 53 resources to host static website using a custom domain. It does exactly what [this](https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html) AWS guide does. That guide is stored as PDF in this repository too; just in case it becomes unavailable or changes.
**Disclaimer**: At the moment of writing this project I am an absolute beginner to Terraform and I am definitely not an AWS expert. I've created it purely for my educational purpose but I thought it may be useful for someone. Any suggestions/contributions are welcome.
## How to run it
There are 2 ways to run this project:
### 1. Interactive mode
The first way is to use interactive mode of providing input. Then all you need to do is to run the following command:
```
terraform apply
```
### 2. Use `*.tfvars` file
Take a look at `vars.tf` and for each input variable provide a value within e.g. `default.tfvars` file and run:
```
terraform apply -var-file="default.tfvars"
```
There is `example.tvars` which may serve as reference point.
Project been tested with Terraform v0.11.3.