aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::S3::Bucket ExpiredObjectDeleteMarker - false positive in drift detection
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::S3::Bucket
### Resource Name
_No response_
### Issue Description
Drift detection reports a drift on a `LifecycleConfiguration Rule` with `ExpiredObjectDeleteMarker` set, even if the resource is in sync.
### Expected Behavior
Resource should not be reported as drifted if both the `LifeCycle rule` and the cloudformation template specify the same value for `ExpiredObjectDeleteMarker`.
### Observed Behavior
The resource is marked as drifted even when `ExpiredObjectDeleteMarker` is set to true in both the template and on the actual resource.
### Test Cases
1) Deploy a stack with the following configuration for a bucket:
```
"Type": "AWS::S3::Bucket",
"Properties": {
"BucketName": "cfn-test",
"LifecycleConfiguration": {
"Rules": [
{
"AbortIncompleteMultipartUpload": {
"DaysAfterInitiation": 3
},
"ExpiredObjectDeleteMarker": true,
"Id": "purge-deleted-files",
"NoncurrentVersionExpirationInDays": 1,
"Status": "Enabled"
} ]
```
2) Run drift detection
3) A drift is reported, marking the `ExpiredObjectDeleteMarker` property as not set
### Other Details
_No response_
Contributor guide
Research direction
No repository file or test is named. Reproduce the issue with the provided AWS::S3::Bucket LifecycleConfiguration template, run drift detection, and compare the reported ExpiredObjectDeleteMarker value with the template and resource; done means matching true values no longer report drift.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100