Skip to content

Commit 2962632

Browse files
committed
feat(obj): add lifecycle description
1 parent 53de417 commit 2962632

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

docs/resources/object_bucket.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ resource "scaleway_object_bucket" "main"{
2929
region = "fr-par"
3030
acl = "private"
3131
32-
# Rule case with storage classes GLACIER designed for low-cost data archiving
33-
# The expire attriute remove objects after a year
32+
# This lifecycle configuration rule will make that all objects that got a filter key that start with (path1/) be transferred
33+
# from their default storage class (STANDARD, ONEZONE_IA) to GLACIER after 120 days counting
34+
# from their creation and then 365 days after that they will be expired and deleted.
3435
lifecycle_rule {
3536
id = "id1"
3637
prefix = "path1/"
@@ -46,7 +47,8 @@ resource "scaleway_object_bucket" "main"{
4647
}
4748
}
4849
49-
# Rule case with only expire action
50+
# This lifecycle configuration rule specifies that all objects (identified by the key name prefix (path2/) in the rule)
51+
# from their creation and then 50 days after that they will be expired and deleted.
5052
lifecycle_rule {
5153
id = "id2"
5254
prefix = "path2/"
@@ -57,11 +59,12 @@ resource "scaleway_object_bucket" "main"{
5759
}
5860
}
5961
60-
# Rule case with prefix and tags filters
62+
# This lifecycle configuration rule directs Scaleway S3 to transition objects with the (path3/)
63+
# prefix to the S3 Glacier Flexible Retrieval storage class soon after creation.
6164
lifecycle_rule {
6265
id = "id3"
6366
prefix = "path3/"
64-
enabled = true
67+
enabled = false
6568
6669
tags = {
6770
"tagKey" = "tagValue"
@@ -73,14 +76,15 @@ resource "scaleway_object_bucket" "main"{
7376
}
7477
}
7578
76-
# Rule case with only tags filter
79+
# This lifecycle configuration rule specifies a tag-based filter (tag1/value1).
80+
# This rule directs Scaleway S3 to transition objects S3 Glacier class soon after creation.
81+
# It is also disable temporaly.
7782
lifecycle_rule {
7883
id = "id4"
7984
enabled = true
8085
8186
tags = {
82-
"tagKey" = "tagValue"
83-
"terraform" = "hashicorp"
87+
"tag1" = "value1"
8488
}
8589
8690
transition {
@@ -89,7 +93,9 @@ resource "scaleway_object_bucket" "main"{
8993
}
9094
}
9195
92-
# Rule case enabling expiration status and with multiparts's uploads limit by days
96+
# This lifecycle configuration rule specifies with the AbortIncompleteMultipartUpload action to
97+
# stop incomplete multipart uploads (identified by the key name prefix (path5/) in the rule)
98+
# if they aren't completed within a specified number of days after initiation.
9399
lifecycle_rule {
94100
prefix = "path5/"
95101
enabled = true

0 commit comments

Comments
 (0)