@@ -29,8 +29,9 @@ resource "scaleway_object_bucket" "main"{
29
29
region = "fr-par"
30
30
acl = "private"
31
31
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.
34
35
lifecycle_rule {
35
36
id = "id1"
36
37
prefix = "path1/"
@@ -46,7 +47,8 @@ resource "scaleway_object_bucket" "main"{
46
47
}
47
48
}
48
49
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.
50
52
lifecycle_rule {
51
53
id = "id2"
52
54
prefix = "path2/"
@@ -57,11 +59,12 @@ resource "scaleway_object_bucket" "main"{
57
59
}
58
60
}
59
61
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.
61
64
lifecycle_rule {
62
65
id = "id3"
63
66
prefix = "path3/"
64
- enabled = true
67
+ enabled = false
65
68
66
69
tags = {
67
70
"tagKey" = "tagValue"
@@ -73,14 +76,15 @@ resource "scaleway_object_bucket" "main"{
73
76
}
74
77
}
75
78
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.
77
82
lifecycle_rule {
78
83
id = "id4"
79
84
enabled = true
80
85
81
86
tags = {
82
- "tagKey" = "tagValue"
83
- "terraform" = "hashicorp"
87
+ "tag1" = "value1"
84
88
}
85
89
86
90
transition {
@@ -89,7 +93,9 @@ resource "scaleway_object_bucket" "main"{
89
93
}
90
94
}
91
95
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.
93
99
lifecycle_rule {
94
100
prefix = "path5/"
95
101
enabled = true
0 commit comments