From a76d95229d02e4e9a5d4a6ec34d0fcfbcb3391db Mon Sep 17 00:00:00 2001 From: Dan Hilton Date: Thu, 21 May 2015 18:28:27 +0100 Subject: [PATCH] provider/google: Add support for Google Compute Stogare buckets. Configure Google Compute Storage buckets using: * name (compulsory attribute) * predefined_acl (optional, default: `projectPrivate`) * location (optional, default: `US`) * force_destroy (optional, default: `false`) Currently supporting only `predefined_acl`s. Bucket attribute updates happen via re-creation. force_destroy will cause bucket objects to be purged, enabling bucket destruction. --- r/storage_bucket.html.markdown | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 r/storage_bucket.html.markdown diff --git a/r/storage_bucket.html.markdown b/r/storage_bucket.html.markdown new file mode 100644 index 00000000..b5aa1535 --- /dev/null +++ b/r/storage_bucket.html.markdown @@ -0,0 +1,32 @@ +--- +layout: "google" +page_title: "Google: google_storage_bucket" +sidebar_current: "docs-google-resource-storage" +description: |- + Creates a new bucket in Google Cloud Storage. +--- + +# google\_storage\_bucket + +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). + + +## Example Usage + +Example creating a private bucket in standard storage, in the EU region. + +``` +resource "google_storage_bucket" "image-store" { + name = "image-store-bucket" + predefined_acl = "projectPrivate" + location = "EU" +} + +``` + +## Argument Reference + +* `name` - (Required) The name of the bucket. +* `predefined_acl` - (Optional, Default: 'private') The [canned GCS ACL](https://cloud.google.com/storage/docs/access-control#predefined-acl) to apply. +* `location` - (Optional, Default: 'US') The [GCS location](https://cloud.google.com/storage/docs/bucket-locations) +* `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.