Skip to content

Commit 86605a6

Browse files
authored
Add Google Cloud Storage bucket configuration
1 parent 5da9b59 commit 86605a6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

code/gcs.tf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
provider "google" {
2+
project = "qwiklabs-gcp-00-44cef3367cad"
3+
region = "us-central1"
4+
}
5+
6+
resource "google_storage_bucket" "example" {
7+
name = "demo-${random_id.rand_suffix.hex}"
8+
location = "us-central1"
9+
force_destroy = true
10+
11+
uniform_bucket_level_access = false
12+
public_access_prevention = "enforced"
13+
}
14+
15+
resource "random_id" "rand_suffix" {
16+
byte_length = 4
17+
}
18+
19+
output "bucket_name" {
20+
value = google_storage_bucket.example.name
21+
}

0 commit comments

Comments
 (0)