Skip to content

Commit d323a9a

Browse files
committed
add variable for public access blocking
1 parent 7dda809 commit d323a9a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resource "google_storage_bucket" "terraform_state" {
1010
force_destroy = var.force_destroy
1111

1212
# Ensure no public access
13-
uniform_bucket_level_access = true
13+
uniform_bucket_level_access = var.block_public_access
1414

1515
labels = var.labels
1616
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ variable "enable_versioning" {
2121
type = bool
2222
}
2323

24+
variable "block_public_access" {
25+
description = "A boolean that indicates to block public access to the bucket"
26+
default = true
27+
type = bool
28+
}
29+
2430
variable "labels" {
2531
description = "A map of bucket labels to add to all resources"
2632
type = map(string)

0 commit comments

Comments
 (0)