mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
a76d95229d
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.
1.3 KiB
1.3 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
Google: google_storage_bucket | docs-google-resource-storage | 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 and 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 to apply.location
- (Optional, Default: 'US') The GCS locationforce_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.