Skip to content

Commit 28181b2

Browse files
allow matches_storage_class empty array (#4809) (#3282)
Signed-off-by: Modular Magician <[email protected]>
1 parent fcfeeb5 commit 28181b2

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.changelog/4809.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
storage: fixed error when `matches_storage_class` is set empty on `google_storage_bucket`
3+
```

google-beta/resource_storage_bucket.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ func resourceStorageBucket() *schema.Resource {
194194
"matches_storage_class": {
195195
Type: schema.TypeList,
196196
Optional: true,
197-
MinItems: 1,
198197
Elem: &schema.Schema{Type: schema.TypeString},
199198
Description: `Storage Class of objects to satisfy this condition. Supported values include: MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, DURABLE_REDUCED_AVAILABILITY.`,
200199
},

google-beta/resource_storage_bucket_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,7 @@ resource "google_storage_bucket" "bucket" {
13321332
type = "Delete"
13331333
}
13341334
condition {
1335+
matches_storage_class = []
13351336
age = 10
13361337
}
13371338
}

0 commit comments

Comments
 (0)