cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

AWS::Events::Rule / MaximumRetryAttempts causes drift detection false-positive

Open tstibbs opened this issue 4 years ago • 3 comments

Name of the resource

AWS::Events::Rule

Resource Name

AWS::Events::Rule

Issue Description

Drift detection reports drift on a Rule which has MaximumRetryAttempts, even if the resource is in sync.

Expected Behavior

Resource should not be reported as drifted if both the rule and the cloudformation template specify the same value for MaximumRetryAttempts.

Observed Behavior

Resource is marked as drifted even though both the rule and the cloudformation template specify the same value for MaximumRetryAttempts.

Test Cases

  1. Deploy a stack with the following template:
    Resources:
      LogGroup:
        Type: AWS::Logs::LogGroup
        Properties:
          RetentionInDays: 3
          LogGroupName: '/aws/events/LogGroup-Test'
    
      Rule:
        Type: AWS::Events::Rule
        Properties:
          ScheduleExpression: cron(0 0 * * ? *)
          State: ENABLED
          Targets:
            - Id: 'CloudwatchLogsTarget'
              Arn: !GetAtt LogGroup.Arn
              RetryPolicy:
                MaximumRetryAttempts: 4
    
  2. Run drift detect
  3. Note that drift detection immediately reports that the rule does not have the MaximumRetryAttempts value set at all.

Other Details

No response

tstibbs avatar Oct 22 '21 14:10 tstibbs

Any news on this? I'm seeing this exact problem with one of my stacks.

Macok avatar May 10 '22 11:05 Macok

Also just encountered this myself. In the drift detect details, the "Actual" state JSON excludes the "RetryPolicy" property entirely. While in the "Expected" state JSON, the "RetryPolicy" is shown correctly.

I have manually verified that the Retry Policy does in fact exist, so the drift detection is a false-positive.

v-willmo avatar Jul 15 '22 05:07 v-willmo

+1 I have the same Drift problem with MaximumRetryAttempts, but all elements of RetryPolicy like MaximumEventAgeInSeconds.

LordSnooz avatar Aug 25 '22 17:08 LordSnooz