cloudformation-coverage-roadmap
cloudformation-coverage-roadmap copied to clipboard
CloudFormation reports drift when there is no drift for BucketOwnerPreferred
Name of the resource
AWS::S3::Bucket
Resource Name
No response
Issue Description
We have an S3 bucket with the following ownership control in the template:
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerPreferred
Drift detection will tell us the stack is drifted: Property: OwnershipControls Change: REMOVE Expected Value: {"Rules":[{"ObjectOwnership":"BucketOwnerPreferred"}]} Current Value: -
When we check the s3 bucket we can see that the ObjectOwnership is configured correctly
Expected Behavior
No drift, drift detection should see:
"OwnershipControls": {
"Rules": [
{
"ObjectOwnership": "BucketOwnerPreferred"
}
]
},
For the actual resource
Observed Behavior
CloudFormation reports drift
Test Cases
Create an S3 bucket using CF with the following setting:
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerPreferred
Check for drift.
Other Details
No response