Provisions S3 website and MX records.
domain = "example.com"
Change key to <repo-name>/terraform.tfstate
, eg:
key = "terraform-aws-s3website/terraform.tfstate"
See .github/workflows/terraform.yml
Go to namecheap.com or similar and plug these in to your domain.
$ terraform output
enable_website = true
Install and init pre-commit and tflint.
$ pip install pre-commit
$ brew install tflint
$ tflint --init
$ pre-commit install
Add checksums for all platforms to terraform lock files
$ make lockfiles
$ pre-commit run --all-files
$ curl -sI http://example.com | grep -E '(301|Server|Location|X-Cache|HTTP)'
HTTP/1.1 301 Moved Permanently
Server: CloudFront
Location: https://example.com/
X-Cache: Redirect from cloudfront
$ curl -sI https://example.com | grep -E '(X-Cache|HTTP)'
HTTP/1.1 200 OK
X-Cache: Hit from cloudfront
$ curl -sI http://www.example.com | grep -E '(301|Server|Location|X-Cache|HTTP)'
HTTP/1.1 301 Moved Permanently
Server: CloudFront
Location: https://www.example.com/
X-Cache: Redirect from cloudfront
$ curl -sI https://www.example.com | grep -E '(301|Server|Location|HTTP)'
HTTP/1.1 301 Moved Permanently
Location: https://example.com/
Server: AmazonS3