aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
Incorrect drift detection results for `AWS::Logs::QueryDefinition` resource type
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::Logs::QueryDefinition
### Resource Name
_No response_
### Issue Description
Drift detection operations are not functioning for the `AWS::Logs::QueryDefinition` resource type.
### Expected Behavior
Running a drift detection should compare the expected and actual configuration of the resource.
### Observed Behavior
When running a drift detection operation, CloudFormation marks the resource as `MODIFIED`, returning a `REMOVED` status under the 'Change' column. This behavior is consistent and easily replicated.
### Test Cases
1. Deploy a `AWS::Logs::QueryDefinition`:
```
Resources:
myQueryDefinition:
Type: AWS::Logs::QueryDefinition
Properties:
Name: "myQueryName"
QueryString: “fields @timestamp, @message | sort @timestamp desc | limit 20"
```
2. Run a drift detection operation on the stack.
3. CloudFormation returns the `MODIFIED` status, with the following details:
Expected
```
{
"QueryString": "?fields @timestamp, @message | sort @timestamp desc | limit 20\"",
"Name": "myQueryName"
}
```
Actual
```
{}
```
### Other Details
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-supported-resources.html
Contributor guide
Research direction
Start with the documented AWS::Logs::QueryDefinition deployment and drift-detection steps, then compare the Expected and Actual payloads in the issue. Done means drift detection compares the deployed configuration correctly instead of reporting MODIFIED with a REMOVED change and an empty actual configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100