github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  ```hcl
    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  * `storage_class` - (Optional) The [Storage Class](https://cloud.google.com/storage/docs/storage-classes) of the new bucket. Supported values include: `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`.
    52  
    53  * `website` - (Optional) Configuration if the bucket acts as a website.
    54  
    55  The optional `website` block supports:
    56  
    57  * `main_page_suffix` - (Optional) Behaves as the bucket's directory index where
    58      missing objects are treated as potential directories.
    59  
    60  * `not_found_page` - (Optional) The custom object to return when a requested
    61      resource is not found.
    62  
    63  ## Attributes Reference
    64  
    65  In addition to the arguments listed above, the following computed attributes are
    66  exported:
    67  
    68  * `self_link` - The URI of the created resource.