Skip to content

Commit 148aa28

Browse files
committed
Use uniform-level access policy in GCS bucket
1 parent 27758d9 commit 148aa28

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

main.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@ data "archive_file" "main" {
4848
}
4949

5050
resource "google_storage_bucket" "main" {
51-
name = coalesce(var.bucket_name, var.name)
52-
force_destroy = var.bucket_force_destroy
53-
location = var.region
54-
project = var.project_id
55-
storage_class = "REGIONAL"
56-
labels = var.bucket_labels
51+
name = coalesce(var.bucket_name, var.name)
52+
force_destroy = var.bucket_force_destroy
53+
location = var.region
54+
project = var.project_id
55+
storage_class = "REGIONAL"
56+
labels = var.bucket_labels
57+
bucket_policy_only = true
5758
}
5859

5960
resource "google_storage_bucket_object" "main" {

0 commit comments

Comments
 (0)