Skip to content

Commit 6c43224

Browse files
authored
Add bitstream bucket to GitHub CI (#2439)
1 parent 10cef46 commit 6c43224

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

  • ci-tools/github-runner/deployments

ci-tools/github-runner/deployments/main.tf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,40 @@ resource "google_project_service" "enabled_apis" {
6868
"compute.googleapis.com",
6969
"run.googleapis.com",
7070
"secretmanager.googleapis.com",
71+
"storage.googleapis.com",
7172
])
7273
project = var.project_id
7374
service = each.key
7475
}
7576

77+
//////////////// Bitstream Bucket
78+
79+
resource "google_storage_bucket" "bitstreams" {
80+
project = var.project_id
81+
name = "${var.project_id}-bitstreams"
82+
location = "US"
83+
force_destroy = false
84+
uniform_bucket_level_access = true
85+
depends_on = [google_project_service.enabled_apis]
86+
87+
lifecycle_rule {
88+
condition {
89+
age = 90
90+
}
91+
action {
92+
type = "Delete"
93+
}
94+
}
95+
}
96+
97+
resource "google_storage_bucket_iam_binding" "bitstreams_public_reader" {
98+
bucket = google_storage_bucket.bitstreams.name
99+
role = "roles/storage.objectViewer"
100+
members = [
101+
"allUsers",
102+
]
103+
}
104+
76105
//////////////// Secrets
77106

78107
// To avoid leaking the secret contents in tfstate, the secret "version"

0 commit comments

Comments
 (0)