aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 54 forks source link

AWS::SQS::Queue - [BUG] - Redrive Policy fields don't match docs #2012

Open danielrbradley opened 5 months ago

danielrbradley commented 5 months ago

Name of the resource

AWS::SQS::Queue

Resource Name

No response

Issue Description

RedriveAllowPolicy and RedrivePolicy are both defined in the schema with the type: [ "object", "string" ] but the documentation accurately describes the available sub-fields for each field.

Expected Behavior

RedriveAllowPolicy should have two fields: redrivePermission and sourceQueueArns.

RedrivePolicy should have two fields: deadLetterTargetArn and maxReceiveCount.

Observed Behavior

The schema describes them as either a string or an untyped "object".

Test Cases

N/A

Other Details

Related issue in the Pulumi provider: https://github.com/pulumi/pulumi-aws-native/issues/1329

kddejong commented 5 months ago

Looks like this matches the API but the question is since the values are known should this be just put into the schema.

The one issue I see here is backwards compatibility. Dropping the string could cause issues to people doing. It would be possible to keep string and object and add the properties to the schema.

RedrivePolicy: |
  {
    "deadLetterTargetArn" : String,
    "maxReceiveCount" : Integer 
  }