-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
README.yaml
116 lines (104 loc) · 4.54 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: ~~terraform-aws-s3-website~~ OBSOLETE
# Tags of this project
tags:
- aws
- terraform
- terraform-modules
- cdn
- route53
- s3
- s3-website
# Categories of this project
categories:
- terraform-modules/cdn
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-s3-website
# Badges to display
badges:
- name: Latest Release
image: https://img.shields.io/github/release/cloudposse/terraform-aws-s3-website.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-s3-website/releases/latest
- name: Last Updated
image: https://img.shields.io/github/last-commit/cloudposse/terraform-aws-s3-website.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-s3-website/commits
- name: Slack Community
image: https://slack.cloudposse.com/for-the-badge.svg
url: https://slack.cloudposse.com
# List any related terraform modules that this module may be used with or that this module depends on.
related:
- name: "terraform-aws-cloudfront-s3-cdn"
description: "Terraform module to easily provision CloudFront CDN backed by an S3 origin"
url: "https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn"
- name: "terraform-aws-s3-log-storage"
description: "This module creates an S3 bucket suitable for receiving logs from other AWS services such as S3, CloudFront, and CloudTrail"
url: "https://github.com/cloudposse/terraform-aws-s3-log-storage"
- name: "terraform-aws-user-data-s3-backend"
description: "Terraform Module to Offload User Data to S3"
url: "https://github.com/cloudposse/terraform-aws-user-data-s3-backend"
- name: "terraform-aws-s3-logs-athena-query"
description: "A Terraform module that creates an Athena Database and Structure for querying S3 access logs"
url: "https://github.com/cloudposse/terraform-aws-s3-logs-athena-query"
- name: "terraform-aws-lb-s3-bucket"
description: "Terraform module to provision an S3 bucket with built in IAM policy to allow AWS Load Balancers to ship access logs"
url: "https://github.com/cloudposse/terraform-aws-lb-s3-bucket"
# Short description of this project
description: |2-
## Deprecated
**As of July, 2023 this module is deprecated.** `terraform-aws-s3-website` offers little value beyond [
the `terraform-aws-s3-bucket` module](https://github.com/cloudposse/terraform-aws-s3-bucket),
so Cloud Posse is phasing out support for this project. Users are advised to migrate to
[terraform-aws-s3-bucket](https://github.com/cloudposse/terraform-aws-s3-bucket) to manage the S3 bucket
(including logging) and [terraform-aws-route53-alias](https://github.com/cloudposse/terraform-aws-route53-alias)
to register the website hostname in Route53. Feature requests should be directed to those modules.
Terraform module to provision S3-backed Websites.
**IMPORTANT:** This module provisions a globally accessible S3 bucket for unauthenticated users because it is designed for hosting public static websites. Normally, AWS recommends that S3 buckets should not publicly accessible in order to protect S3 data from unauthorized users.
# How to use this project
usage: |-
#### Create s3 website bucket
```hcl
module "website" {
source = "cloudposse/s3-website/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "prod"
name = "app"
hostname = "docs.prod.cloudposse.org"
deployment_arns = {
"arn:aws:s3:::principal1" = ["/prefix1", "/prefix2"]
"arn:aws:s3:::principal2" = [""]
}
}
```
#### Create S3 website bucket with Route53 DNS
Required one of the `parent_zone_id` or `parent_zone_name`
```hcl
module "website_with_cname" {
source = "cloudposse/s3-website/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "prod"
name = "app"
hostname = "docs.prod.cloudposse.org"
parent_zone_id = "XXXXXXXXXXXX"
}
```
references:
- name: "Hosting Websites on Amazon S3"
description: "Example: setting up a Static Website Using a Custom Domain"
url: "http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html"
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors: []