aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

[AWS::SQS::Queue] - [BUG] - Issue with Drift Detection and RedrivePolicy

Open
#2,020 1 comment 3 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::SQS::Queue

### Resource Name

_No response_

### Issue Description

Reopening https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/566 because the issue can be still reproduced.

### Expected Behavior

Should be IN_SYNC when the current configuration of the resource matches its expected template configuration.

### Observed Behavior

My template here:
``` sqs-redrive-allow-policy.yml
Resources:
Quque1:
Type: AWS::SQS::Queue
Properties:
QueueName: !Sub "${AWS::StackName}-1"
RedriveAllowPolicy:
redrivePermission: denyAll
RedrivePolicy:
deadLetterTargetArn: !GetAtt Queue2.Arn
maxReceiveCount: 3
Queue2:
Type: AWS::SQS::Queue
Properties:
QueueName: !Sub "${AWS::StackName}-2"
RedriveAllowPolicy:
redrivePermission: byQueue
sourceQueueArns:
- !Sub "arn:${AWS::Partition}:sqs:${AWS::Region}:${AWS::AccountId}:${AWS::StackName}-1"
```

Reproducing steps:
```
$ aws cloudformation create-stack --stack-name sqs-redrive-allow-policy --template-body file://sqs-redrive-allow-policy.yml

$ aws cloudformation detect-stack-drift --stack-name sqs-redrive-allow-policy
{
"StackDriftDetectionId": ""
}

$ aws cloudformation describe-stack-drift-detection-status --stack-drift-detection-id
{
"StackId": "",
"StackDriftDetectionId": "",
"StackDriftStatus": "DRIFTED",
"DetectionStatus": "DETECTION_COMPLETE",
"DriftedStackResourceCount": 2,
"Timestamp": ""
}

$ aws cloudformation describe-stack-resource-drifts --stack-name sqs-redrive-allow-policy
```

I see RedriveAllowPolicy property is unexpectedly drifted.

### Test Cases

N/A

### Other Details

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.