I created a terraform file to create a Google Storage bucket with public readable Storage object permission. I am able to deploy the Storage bucket but can't assign the proper ACL against my template, I found some errors for ACL part.
provider "google-beta" {
project = "${var.project}"
}
resource "google_storage_default_object_access_control" "public_rule" {
bucket = "google_storage_bucket.test-${var.project}"
role = "READER"
entity = "allUsers"
}
resource "google_storage_bucket" "bucket" {
name = "test-${var.project}"
storage_class = "standard"
location = "US"
}
if anyone can help me to assign permission at the time of bucket creation, will be greatfull.