github.com/jmbataller/terraform@v0.6.8-0.20151125192640-b7a12e3a580c/website/source/docs/providers/google/r/storage_object_acl.html.markdown (about)

     1  ---
     2  layout: "google"
     3  page_title: "Google: google_storage_object_acl"
     4  sidebar_current: "docs-google-storage-object-acl"
     5  description: |-
     6    Creates a new object ACL in Google Cloud Storage.
     7  ---
     8  
     9  # google\_storage\_object\_acl
    10  
    11  Creates a new object ACL in Google cloud storage service (GCS)
    12  
    13  ## Example Usage
    14  
    15  Create an object ACL with one owner and one reader.
    16  
    17  ```
    18  resource "google_storage_bucket" "image-store" {
    19  	name = "image-store-bucket"
    20  	location = "EU"
    21  }
    22  
    23  resource "google_storage_bucket_object" "image" {
    24  	name = "image1"
    25      bucket = "${google_storage_bucket.name}"
    26      source = "image1.jpg"
    27  }
    28  
    29  resource "google_storage_object_acl" "image-store-acl" {
    30      bucket = "${google_storage_bucket.image_store.name}"
    31      object = "${google_storage_bucket_object.image_store.name}"
    32      role_entity = ["OWNER:user-my.email@gmail.com",
    33          "READER:group-mygroup"]
    34  }
    35  
    36  ```
    37  
    38  ## Argument Reference
    39  
    40  * `bucket` - (Required) The name of the bucket it applies to.
    41  * `object` - (Required) The name of the object it applies to.
    42  * `predefined_acl` - (Optional) The [canned GCS ACL](https://cloud.google.com/storage/docs/access-control#predefined-acl) to apply. Must be set if `role_entity` is not.
    43  * `role_entity` - (Optional) List of role/entity pairs in the form `ROLE:entity`. See [GCS Object ACL documentation](https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls) for more details. Must be set if `predefined_acl` is not.