github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/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-resource-storage"
     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  ```
    19  resource "google_storage_bucket" "image-store" {
    20      name = "image-store-bucket"
    21      predefined_acl = "projectPrivate"
    22      location = "EU"
    23      website {
    24          main_page_suffix = "index.html"
    25          not_found_page = "404.html"
    26      }
    27  }
    28  
    29  ```
    30  
    31  ## Argument Reference
    32  
    33  The following arguments are supported:
    34  
    35  * `name` - (Required) The name of the bucket.
    36  * `predefined_acl` - (Optional, Default: 'private') The [canned GCS ACL](https://cloud.google.com/storage/docs/access-control#predefined-acl) to apply.
    37  * `location` - (Optional, Default: 'US') The [GCS location](https://cloud.google.com/storage/docs/bucket-locations) 
    38  * `force_destroy` - (Optional, Default: false) When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, Terraform will fail that run. 
    39  
    40  The optional `website` block supports:
    41  
    42  * `main_page_suffix` - (Optional) Behaves as the bucket's directory index where missing objects are treated as potential directories.
    43  * `not_found_page` - (Optional) The custom object to return when a requested resource is not found.
    44  
    45  ## Attributes Reference
    46  
    47  The following attributes are exported:
    48  
    49  * `self_link` - The URI of the created resource.