-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathaws-s3.tf
100 lines (81 loc) · 1.98 KB
/
aws-s3.tf
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
module "s3_bucket_terraform" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "4.1.2"
bucket = "haxe-terraform"
acl = "private"
versioning = {
enabled = true
}
lifecycle_rule = [
{
id = "noncurrent"
enabled = true
noncurrent_version_transition = [
{
days = 30
storage_class = "GLACIER"
},
]
noncurrent_version_expiration = {
days = 300
}
}
]
}
module "s3_bucket_api-haxe-org" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "4.1.2"
bucket = "api.haxe.org"
attach_policy = true
policy = data.aws_iam_policy_document.public_access_s3_api-haxe-org.json
acl = "public-read"
block_public_acls = false
block_public_policy = false
ignore_public_acls = false
restrict_public_buckets = false
control_object_ownership = true
object_ownership = "BucketOwnerPreferred"
website = {
index_document = "index.html"
}
}
data "aws_iam_policy_document" "public_access_s3_api-haxe-org" {
statement {
principals {
type = "*"
identifiers = ["*"]
}
actions = ["s3:GetObject"]
resources = ["${module.s3_bucket_api-haxe-org.s3_bucket_arn}/*"]
}
}
resource "aws_s3_bucket" "aws-sdk-neko" {
bucket = "aws-sdk-neko"
}
resource "aws_s3_bucket" "blog-haxe-org" {
bucket = "blog.haxe.org"
}
resource "aws_s3_bucket" "build-haxe-org" {
bucket = "build.haxe.org"
}
resource "aws_s3_bucket" "code-haxe-org" {
bucket = "code.haxe.org"
}
resource "aws_s3_bucket" "haxe-blog" {
bucket = "haxe-blog"
}
resource "aws_s3_bucket" "haxe-org" {
bucket = "haxe.org"
}
resource "aws_s3_bucket" "nekovm-org" {
bucket = "nekovm.org"
}
resource "aws_s3_bucket" "staging-haxe-org" {
bucket = "staging.haxe.org"
}
resource "aws_s3_bucket" "www-haxe-org" {
bucket = "www.haxe.org"
}
resource "aws_s3_bucket" "www-haxedevelop-org" {
bucket = "www.haxedevelop.org"
}