1
votes

According to the documentation (https://www.terraform.io/docs/providers/google/r/storage_bucket.html),

the acceptable values for "storage_class" are: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.

However, what if I want to deploy a GCP bucket that's REGIONAL and ARCHIVE?

I've tried:

storage_class = "ARCHIVE, REGIONAL"

And:

storage_class = "ARCHIVE", "REGIONAL"

Neither unfortunately work. For the first, I receive the message:

Argument definitions must be separated by newlines, not commas. An argument definition must end with a newline.

For the second, I receive the message:

Invalid Value

Is it possible to define multiple storage classes for GCP buckets with Terraform?

1
I would imagine it's just not supported. Add a feature request onto the provider github pageLiam

1 Answers

2
votes

Cloud Storage has four storage classes that is:

  • Standard
  • Nearline
  • Coldline
  • Archive

However, there are also additional storage classes which cannot be created using GCP Console. This additional classes are also equivalent to Standard storage, except on how each objects are stored depending on the region.

It is a conflict to deploy a bucket that is both REGIONAL and ARCHIVE storage classes. According to the Cloud Storage documentation:

Regional Storage: Equivalent to Standard Storage, except Regional Storage can only be used for objects stored in regions.