Describe the bug
Cfn template value is always byQueue, regardless of the value of redriveAllowPolicy.redrivePermission set in the CDK
const myQueueAllowAll = new sqs.Queue(this, 'MyQueueAllowAll', {
queueName: 'MyQueueAllowAll',
redriveAllowPolicy: {
redrivePermission: sqs.RedrivePermission.ALLOW_ALL,
},
});
const myQueueDenyAll = new sqs.Queue(this, 'MyQueueDenyAll', {
queueName: 'MyQueueDenyAll',
redriveAllowPolicy: {
redrivePermission: sqs.RedrivePermission.DENY_ALL,
},
});
Expected Behavior
The configured values are output to the Cfn template.
Current Behavior
The value of the Cfn template is always byQueue
{
"Resources": {
"MyQueueAllowAllAF132E44": {
"Type": "AWS::SQS::Queue",
"Properties": {
"QueueName": "MyQueueAllowAll",
"RedriveAllowPolicy": {
"redrivePermission": "byQueue"
}
}
},
"MyQueueDenyAll6B4D4BA9": {
"Type": "AWS::SQS::Queue",
"Properties": {
"QueueName": "MyQueueDenyAll",
"RedriveAllowPolicy": {
"redrivePermission": "byQueue"
}
}
}
}
}
Reproduction Steps
Generate cfn template with code written in Describe the bug
Possible Solution
Change the expression of redrivePermission.
queue.ts
redrivePermission: props.redriveAllowPolicy.redrivePermission
// When `sourceQueues` is provided in `redriveAllowPolicy`, `redrivePermission` defaults to allow specified queues (`BY_QUEUE`);
// otherwise, it defaults to allow all queues (`ALLOW_ALL`).
?? props.redriveAllowPolicy.sourceQueues ? RedrivePermission.BY_QUEUE : RedrivePermission.ALLOW_ALL,
to
redrivePermission: props.redriveAllowPolicy.redrivePermission
// When `sourceQueues` is provided in `redriveAllowPolicy`, `redrivePermission` defaults to allow specified queues (`BY_QUEUE`);
// otherwise, it defaults to allow all queues (`ALLOW_ALL`).
?? (props.redriveAllowPolicy.sourceQueues ? RedrivePermission.BY_QUEUE : RedrivePermission.ALLOW_ALL),
Additional Information/Context
No response
CDK CLI Version
2.128.0
Framework Version
No response
Node.js Version
v20.11.0
OS
Windows 11
Language
TypeScript
Language Version
No response
Other information
No response
Describe the bug
Cfn template value is always
byQueue,regardless of the value of redriveAllowPolicy.redrivePermission set in the CDKExpected Behavior
The configured values are output to the Cfn template.
Current Behavior
The value of the Cfn template is always
byQueue{ "Resources": { "MyQueueAllowAllAF132E44": { "Type": "AWS::SQS::Queue", "Properties": { "QueueName": "MyQueueAllowAll", "RedriveAllowPolicy": { "redrivePermission": "byQueue" } } }, "MyQueueDenyAll6B4D4BA9": { "Type": "AWS::SQS::Queue", "Properties": { "QueueName": "MyQueueDenyAll", "RedriveAllowPolicy": { "redrivePermission": "byQueue" } } } } }Reproduction Steps
Generate cfn template with code written in Describe the bug
Possible Solution
Change the expression of redrivePermission.
queue.ts
to
Additional Information/Context
No response
CDK CLI Version
2.128.0
Framework Version
No response
Node.js Version
v20.11.0
OS
Windows 11
Language
TypeScript
Language Version
No response
Other information
No response