-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COS: Added support for Noncurrent version expiration, EODM & abort incomplete MPU #3359
COS: Added support for Noncurrent version expiration, EODM & abort incomplete MPU #3359
Conversation
Here is the test results:- === RUN TestAccIBMCosBucket_noncurrentversion === RUN TestAccIBMCosBucket_AbortIncompeleteMPU === RUN TestAccIBMCosBucket_Expiredays === RUN TestAccIBMCosBucket_Expiredate === RUN TestAccIBMCosBucket_Expireddeletemarker |
5b6e3f4
to
893b184
Compare
share the test results of old testcases also |
ibm/resource_ibm_cos_bucket.go
Outdated
@@ -227,7 +260,7 @@ func resourceIBMCOSBucket() *schema.Resource { | |||
"expire_rule": { | |||
Type: schema.TypeList, | |||
Optional: true, | |||
MaxItems: 1000, | |||
MaxItems: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can create multiple expiry rules?
why the number is changed from 1000 to 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Max item should be 1 only . Once we change to 1000, it failed with below error in testing
resource_ibm_cos_bucket_test.go:92: Step 1/2 error: Error running pre-apply refresh: exit status 1
2021/11/24 20:46:00 [DEBUG] Using modified User-Agent: Terraform/0.12.28 HashiCorp-terraform-exec/0.14.0
Error: InternalValidate
Internal validation of the provider failed! This is always a bug
with the provider itself, and not a user issue. Please report
this bug:
1 error occurred:
* resource ibm_cos_bucket: ConflictsWith: expired_object_delete_marker
configuration block reference (expire_rule.0.date) can only be used with
TypeList and MaxItems: 1 configuration blocks
ibm/resource_ibm_cos_bucket.go
Outdated
Type: schema.TypeList, | ||
Optional: true, | ||
MaxItems: 1, | ||
Description: "Protect objects from accidental deletion or overwrites. Versioning allows you to keep multiple versions of an object protecting from unintentional data loss.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is conflict removed here we can proivide object_versioning along with retention_rule and expire_rule
|
||
- `crn` - (String) The CRN of the bucket. | ||
- `cross_region_location` - (String) The location to create a cross-regional bucket. | ||
- `single_site_location` - (String) The location to create a single site bucket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the order changed they were arranged in alphabetical order
|
||
Nested scheme for `expire_rule`: | ||
- `rule_id` - (Optional, Computed, String) Unique ID for the rule. Expire rules allow you to set a specific time frame after which objects are deleted. | ||
- `enable` - (Required, Bool) Specifies expire rule status either `enable` or `disable` for a bucket. | ||
- `days` - (Required, String) Specifies the number of days when the specific rule action takes effect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrange the nested structure inner attributes in alphabetical order for all rules
0d986cc
to
fe493e1
Compare
here is the rest test cases result except TestAccIBMCosBucket_ActivityTracker_Monitor === RUN TestAccIBMCosBucket_Archive_Expiration === RUN TestAccIBMCosBucket_Archive_Expiration === RUN TestAccIBMCosBucket_Retention === RUN TestAccIBMCosBucket_Object_Versioning === RUN TestAccIBMCosBucket_Hard_Quota === RUN TestAccIBMCosBucket_Smart_Type === RUN TestAccIBMCosBucket_import === RUN TestAccIBMCosBucket_Expireddeletemarker |
fe493e1
to
f9c4874
Compare
changes for objectv2 & mpu updated documentation updated based on the comment updated based on the comment updated back with max1 updated maxitem of expiry & added diff function updated maxitem of expiry & added diff function
f9c4874
to
deb779f
Compare
Test result after making changes with Maxitems to 1000 --- PASS: TestAccIBMCosBucket_Expiredays (149.91s) --- PASS: TestAccIBMCosBucket_Expiredate (272.23s) |
COS Objectversioning ph2 & abort incomplete MPU:----