Skip to content

Commit

Permalink
feat: add website public bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsna committed Oct 4, 2023
1 parent 9da7c30 commit 951eb5d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions terraform/cloud_storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,24 @@ resource "google_storage_bucket" "website_images" {
enabled = var.bucket_versioning
}
}

resource "google_storage_bucket" "website" {
name = "basedosdados-website"
location = var.bucket_location
storage_class = var.bucket_storage_class
force_destroy = var.bucket_force_destroy
uniform_bucket_level_access = var.bucket_uniform_bucket_level_access

versioning {
enabled = var.bucket_versioning
}
}

resource "google_storage_bucket_iam_binding" "all_users_read" {
bucket = google_storage_bucket.website.name
role = "roles/storage.objectViewer"

members = [
"allUsers",
]
}

0 comments on commit 951eb5d

Please sign in to comment.