forked from kriasoft/graphql-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage.tf
41 lines (31 loc) · 939 Bytes
/
storage.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
// Google Cloud Storage
// https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket
resource "google_storage_bucket" "storage" {
name = var.storage_bucket
location = "US"
force_destroy = false
uniform_bucket_level_access = false
}
resource "google_storage_bucket" "upload" {
name = var.upload_bucket
location = "US-CENTRAL1"
force_destroy = false
uniform_bucket_level_access = true
cors {
max_age_seconds = 3600
method = ["GET", "HEAD", "PUT", "OPTIONS"]
origin = ["*"]
response_header = ["Content-Type", "Access-Control-Allow-Origin"]
}
retention_policy {
is_locked = false
retention_period = 86400
}
}
resource "google_storage_bucket" "cache" {
name = var.cache_bucket
location = "US-CENTRAL1"
force_destroy = false
uniform_bucket_level_access = true
timeouts {}
}