mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-07 11:11:13 +00:00
1.8 KiB
1.8 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"
location = "EU"
website {
main_page_suffix = "index.html"
not_found_page = "404.html"
}
}
Argument Reference
The following arguments are supported:
name
- (Required) The name of the bucket.predefined_acl
- (Optional, Deprecated) The canned GCS ACL to apply. Please switch togoogle_storage_bucket_acl.predefined_acl
.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.
The optional website
block supports:
main_page_suffix
- (Optional) Behaves as the bucket's directory index where missing objects are treated as potential directories.not_found_page
- (Optional) The custom object to return when a requested resource is not found.
Attributes Reference
The following attributes are exported:
self_link
- The URI of the created resource.