Google Cloud Storage Default Object ACL

This page shows how to write Terraform for Cloud Storage Default Object ACL and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (google_storage_default_object_acl)

Authoritatively manages the default object ACLs for a Google Cloud Storage bucket without managing the bucket itself. -> Note that for each object, its creator will have the "OWNER" role in addition to the default ACL that has been defined. For more information see the official documentation and API. -> Want fine-grained control over default object ACLs? Use google_storage_default_object_access_control to control individual role entity pairs.

Parameters

Example Usage (from GitHub)

github-icontsm2k/terraform_deploy
resource "google_storage_default_object_acl" "tfer--trip-002D-planner-002D-gcs" {
  bucket      = "trip-planner-gcs"
  role_entity = ["READER:project-viewers-1078932510854", "OWNER:project-editors-1078932510854", "OWNER:project-owners-1078932510854"]
}

resource "google_storage_default_object_acl" "tfer--trip-002D-planner-002D-storage" {
github-iconniveklabs/google
resource "google_storage_default_object_acl" "this" {
  bucket      = var.bucket
  role_entity = var.role_entity
}

github-iconjdpleiness/terraform-google-storage-static-website
resource "google_storage_default_object_acl" "this" {
  bucket      = google_storage_bucket.this.name
  role_entity = var.role_entity
}
github-iconineffyble/AllTheClouds
resource "google_storage_default_object_acl" "default_object_acl" {
  bucket      = google_storage_bucket.bucket.name
  role_entity = ["READER:allUsers"]
}

resource "google_compute_global_forwarding_rule" "forwarding_rule" {
github-iconchechiachang/terraform-playground
resource "google_storage_default_object_acl" "testing" {
  bucket      = "testing"
  role_entity = ["OWNER:project-editors-307194479120", "OWNER:project-owners-307194479120", "READER:project-viewers-307194479120"]
}

Frequently asked questions

What is Google Cloud Storage Default Object ACL?

Google Cloud Storage Default Object ACL is a resource for Cloud Storage of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google Cloud Storage Default Object ACL?

For Terraform, the tsm2k/terraform_deploy, niveklabs/google and jdpleiness/terraform-google-storage-static-website source code examples are useful. See the Terraform Example section for further details.