Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions code/build/gcs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
provider "google" {
project = "qwiklabs-gcp-04-e13b9641d9a5"
region = "us-central1"
}

resource "google_storage_bucket" "example" {
name = "demo-${random_id.rand_suffix.hex}"
location = "us-central1"
force_destroy = true

uniform_bucket_level_access = false
public_access_prevention = "enforced"
}
Comment on lines +6 to +13

Check failure

Code scanning / checkov

Ensure Cloud storage has versioning enabled Error

Ensure Cloud storage has versioning enabled
Comment on lines +6 to +13

Check failure

Code scanning / checkov

Ensure that Cloud Storage buckets have uniform bucket-level access enabled Error

Ensure that Cloud Storage buckets have uniform bucket-level access enabled
Comment on lines +6 to +13

Check failure

Code scanning / checkov

Bucket should log access Error

Bucket should log access

resource "random_id" "rand_suffix" {
byte_length = 4
}

output "bucket_name" {
value = google_storage_bucket.example.name
}
Loading