FlexibleEngineCloud / terraform-provider-flexibleengine

Terraform flexibleengine provider
https://www.terraform.io/docs/providers/flexibleengine/
Mozilla Public License 2.0
30 stars 53 forks source link

Can't create COLD/GLACIER OBS bucket #337

Closed mgodlewski closed 4 years ago

mgodlewski commented 4 years ago

Terraform Version

Terraform v0.12.13

Affected Resource(s)

First try (following the documentation)

Terraform Configuration Files

resource "flexibleengine_obs_bucket" "test" {
  bucket = "test"
  acl    = "private"
  storage_class = "COLD"
}

Expected Behavior

Create a OBS bucket

Actual Behavior

Error: Error creating bucket mpa-prp-mysqldump: InvalidDefaultStorageClass,
 Reason: The default storage class is invalid, it can only be STANDARD, STANDARD_IA or GLACIER.

Steps to Reproduce

terraform apply

Second try (following the previous error message)

Terraform Configuration Files

resource "flexibleengine_obs_bucket" "test" {
  bucket = "test"
  acl    = "private"
  storage_class = "GLACIER"
}

Expected Behavior

Create a OBS bucket

Actual Behavior

Error: expected storage_class to be one of [STANDARD WARM COLD], got GLACIER

Steps to Reproduce

terraform validate

ShiChangkuo commented 4 years ago

@mgodlewski the first error was raised by API/sdk side while the second error was raised by provider.

Maybe the storage_class was changed from the API side, I will cancel the validation of storage_class in provider, so you can use "GLACIER" to create a bucket.