You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updated based on comment
updated based on comment
Set the attribute level based on comment
Revert "Set the attribute level based on comment"
This reverts commit e189b957e76fc1cbc79a3cad5f0f84e5a6804e19.
Set the attribute level based on comment
Description: "A retention policy is enabled at the IBM Cloud Object Storage bucket level. Minimum, maximum and default retention period are defined by this policy and apply to all objects in the bucket.",
194
+
ForceNew: true,
195
+
Elem: &schema.Resource{
196
+
Schema: map[string]*schema.Schema{
197
+
"default": {
198
+
Type: schema.TypeInt,
199
+
Required: true,
200
+
ValidateFunc: validateAllowedRangeInt(0, 365243),
201
+
Description: "If an object is stored in the bucket without specifying a custom retention period.",
202
+
ForceNew: false,
203
+
},
204
+
"maximum": {
205
+
Type: schema.TypeInt,
206
+
Required: true,
207
+
ValidateFunc: validateAllowedRangeInt(0, 365243),
208
+
Description: "Maximum duration of time an object can be kept unmodified in the bucket.",
209
+
ForceNew: false,
210
+
},
211
+
"minimum": {
212
+
Type: schema.TypeInt,
213
+
Required: true,
214
+
ValidateFunc: validateAllowedRangeInt(0, 365243),
215
+
Description: "Minimum duration of time an object must be kept unmodified in the bucket",
216
+
ForceNew: false,
217
+
},
218
+
"permanent": {
219
+
Type: schema.TypeBool,
220
+
Optional: true,
221
+
Default: false,
222
+
Description: "Enable or disable the permanent retention policy on the bucket",
223
+
},
224
+
},
225
+
},
226
+
},
189
227
},
190
228
}
191
229
}
@@ -347,6 +385,20 @@ func dataSourceIBMCosBucketRead(d *schema.ResourceData, meta interface{}) error
Description: "A retention policy is enabled at the IBM Cloud Object Storage bucket level. Minimum, maximum and default retention period are defined by this policy and apply to all objects in the bucket.",
258
+
ForceNew: true,
259
+
Elem: &schema.Resource{
260
+
Schema: map[string]*schema.Schema{
261
+
"default": {
262
+
Type: schema.TypeInt,
263
+
Required: true,
264
+
ValidateFunc: validateAllowedRangeInt(0, 365243),
265
+
Description: "If an object is stored in the bucket without specifying a custom retention period.",
266
+
ForceNew: false,
267
+
},
268
+
"maximum": {
269
+
Type: schema.TypeInt,
270
+
Required: true,
271
+
ValidateFunc: validateAllowedRangeInt(0, 365243),
272
+
Description: "Maximum duration of time an object can be kept unmodified in the bucket.",
273
+
ForceNew: false,
274
+
},
275
+
"minimum": {
276
+
Type: schema.TypeInt,
277
+
Required: true,
278
+
ValidateFunc: validateAllowedRangeInt(0, 365243),
279
+
Description: "Minimum duration of time an object must be kept unmodified in the bucket",
280
+
ForceNew: false,
281
+
},
282
+
"permanent": {
283
+
Type: schema.TypeBool,
284
+
Optional: true,
285
+
Default: false,
286
+
Description: "Enable or disable the permanent retention policy on the bucket",
0 commit comments