-
Notifications
You must be signed in to change notification settings - Fork 273
Expand file tree
/
Copy pathinfrastructure.tf
More file actions
39 lines (33 loc) · 843 Bytes
/
infrastructure.tf
File metadata and controls
39 lines (33 loc) · 843 Bytes
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
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "www-duckhuntjs-com" {
bucket = "www.duckhuntjs.com"
acl = "public-read"
website {
redirect_all_requests_to = "duckhuntjs.com"
}
}
resource "aws_s3_bucket" "duckhuntjs-com" {
bucket = "duckhuntjs.com"
acl = "public-read"
policy = file("s3policy.json")
website {
index_document = "index.html"
error_document = "index.html"
}
}
resource "cloudflare_record" "www-duckhuntjs-com" {
zone_id = "1628b8b553f25aaa53447ae74afc7e50"
name = "www"
value = aws_s3_bucket.www-duckhuntjs-com.website_endpoint
type = "CNAME"
ttl = 3600
}
resource "cloudflare_record" "duckhuntjs-com" {
zone_id = "1628b8b553f25aaa53447ae74afc7e50"
name = "duckhuntjs.com"
value = aws_s3_bucket.duckhuntjs-com.website_endpoint
type = "CNAME"
ttl = 3600
}