2015-09-16 18:46:46 +00:00
---
layout: "google"
page_title: "Google: google_storage_bucket_acl"
2015-10-23 14:10:41 +00:00
sidebar_current: "docs-google-storage-bucket-acl"
2015-09-16 18:46:46 +00:00
description: |-
Creates a new bucket ACL in Google Cloud Storage.
---
# google\_storage\_bucket\_acl
2017-06-06 23:08:45 +00:00
Creates a new bucket ACL in Google cloud storage service (GCS). For more information see
[the official documentation ](https://cloud.google.com/storage/docs/access-control/lists )
and
[API ](https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls ).
2015-09-16 18:46:46 +00:00
## Example Usage
Example creating an ACL on a bucket with one owner, and one reader.
2017-04-17 10:17:54 +00:00
```hcl
2015-09-16 18:46:46 +00:00
resource "google_storage_bucket" "image-store" {
2016-04-10 21:34:15 +00:00
name = "image-store-bucket"
location = "EU"
2015-09-16 18:46:46 +00:00
}
resource "google_storage_bucket_acl" "image-store-acl" {
2017-02-03 16:26:39 +00:00
bucket = "${google_storage_bucket.image-store.name}"
2015-09-16 18:46:46 +00:00
2016-04-10 21:34:15 +00:00
role_entity = [
"OWNER:user-my.email@gmail.com",
"READER:group-mygroup",
]
}
2015-09-16 18:46:46 +00:00
```
## Argument Reference
* `bucket` - (Required) The name of the bucket it applies to.
2016-04-10 21:34:15 +00:00
- - -
2017-06-06 11:59:52 +00:00
* `predefined_acl` - (Optional) The [canned GCS ACL ](https://cloud.google.com/storage/docs/access-control/lists#predefined-acl ) to apply. Must be set if `role_entity` is not.
2016-04-10 21:34:15 +00:00
2017-02-03 16:09:03 +00:00
* `role_entity` - (Optional) List of role/entity pairs in the form `ROLE:entity` . See [GCS Bucket ACL documentation ](https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls ) for more details. Must be set if `predefined_acl` is not.
2016-04-10 21:34:15 +00:00
2017-06-30 10:36:39 +00:00
* `default_acl` - (Optional) Configure this ACL to be the default ACL.
2016-04-10 21:34:15 +00:00
## Attributes Reference
Only the arguments listed above are exposed as attributes.