github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/website/source/docs/providers/google/r/storage_bucket.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_storage_bucket" 4 sidebar_current: "docs-google-storage-bucket" 5 description: |- 6 Creates a new bucket in Google Cloud Storage. 7 --- 8 9 # google\_storage\_bucket 10 11 Creates a new bucket in Google cloud storage service(GCS). Currently, it will not change location nor ACL once a bucket has been created with Terraform. For more information see [the official documentation](https://cloud.google.com/storage/docs/overview) and [API](https://cloud.google.com/storage/docs/json_api). 12 13 14 ## Example Usage 15 16 Example creating a private bucket in standard storage, in the EU region. 17 18 ```js 19 resource "google_storage_bucket" "image-store" { 20 name = "image-store-bucket" 21 location = "EU" 22 23 website { 24 main_page_suffix = "index.html" 25 not_found_page = "404.html" 26 } 27 } 28 ``` 29 30 ## Argument Reference 31 32 The following arguments are supported: 33 34 * `name` - (Required) The name of the bucket. 35 36 - - - 37 38 * `force_destroy` - (Optional, Default: false) When deleting a bucket, this 39 boolean option will delete all contained objects. If you try to delete a 40 bucket that contains objects, Terraform will fail that run. 41 42 * `location` - (Optional, Default: 'US') The [GCS location](https://cloud.google.com/storage/docs/bucket-locations) 43 44 45 * `predefined_acl` - (Optional, Deprecated) The [canned GCS ACL](https://cloud.google.com/storage/docs/access-control#predefined-acl) to apply. Please switch 46 to `google_storage_bucket_acl.predefined_acl`. 47 48 * `project` - (Optional) The project in which the resource belongs. If it 49 is not provided, the provider project is used. 50 51 * `website` - (Optional) Configuration if the bucket acts as a website. 52 53 The optional `website` block supports: 54 55 * `main_page_suffix` - (Optional) Behaves as the bucket's directory index where 56 missing objects are treated as potential directories. 57 58 * `not_found_page` - (Optional) The custom object to return when a requested 59 resource is not found. 60 61 ## Attributes Reference 62 63 In addition to the arguments listed above, the following computed attributes are 64 exported: 65 66 * `self_link` - The URI of the created resource.