Merge pull request #12044 from sbadia/gcs_storage_class

doc: gcs - Update storage_class documentation and tests
This commit is contained in:
Paddy 2017-02-17 16:13:29 -08:00 committed by GitHub
commit 27c185e1c9
2 changed files with 5 additions and 5 deletions

View File

@ -68,12 +68,12 @@ func TestAccStorageStorageClass(t *testing.T) {
CheckDestroy: testAccGoogleStorageDestroy, CheckDestroy: testAccGoogleStorageDestroy,
Steps: []resource.TestStep{ Steps: []resource.TestStep{
{ {
Config: testGoogleStorageBucketsReaderStorageClass(bucketName, "STANDARD"), Config: testGoogleStorageBucketsReaderStorageClass(bucketName, "MULTI_REGIONAL"),
Check: resource.ComposeTestCheckFunc( Check: resource.ComposeTestCheckFunc(
testAccCheckCloudStorageBucketExists( testAccCheckCloudStorageBucketExists(
"google_storage_bucket.bucket", bucketName), "google_storage_bucket.bucket", bucketName),
resource.TestCheckResourceAttr( resource.TestCheckResourceAttr(
"google_storage_bucket.bucket", "storage_class", "STANDARD"), "google_storage_bucket.bucket", "storage_class", "MULTI_REGIONAL"),
), ),
}, },
{ {
@ -86,12 +86,12 @@ func TestAccStorageStorageClass(t *testing.T) {
), ),
}, },
{ {
Config: testGoogleStorageBucketsReaderStorageClass(bucketName, "DURABLE_REDUCED_AVAILABILITY"), Config: testGoogleStorageBucketsReaderStorageClass(bucketName, "REGIONAL"),
Check: resource.ComposeTestCheckFunc( Check: resource.ComposeTestCheckFunc(
testAccCheckCloudStorageBucketExists( testAccCheckCloudStorageBucketExists(
"google_storage_bucket.bucket", bucketName), "google_storage_bucket.bucket", bucketName),
resource.TestCheckResourceAttr( resource.TestCheckResourceAttr(
"google_storage_bucket.bucket", "storage_class", "DURABLE_REDUCED_AVAILABILITY"), "google_storage_bucket.bucket", "storage_class", "REGIONAL"),
), ),
}, },
}, },

View File

@ -48,7 +48,7 @@ to `google_storage_bucket_acl.predefined_acl`.
* `project` - (Optional) The project in which the resource belongs. If it * `project` - (Optional) The project in which the resource belongs. If it
is not provided, the provider project is used. is not provided, the provider project is used.
* `storage_class` - (Optional) The [Storage Class](https://cloud.google.com/storage/docs/storage-classes) of the new bucket. Supported values include: `STANDARD`, `NEARLINE`, `DURABLE_REDUCED_AVAILABILITY` * `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`.
* `website` - (Optional) Configuration if the bucket acts as a website. * `website` - (Optional) Configuration if the bucket acts as a website.