Like the title says, AWS CloudFormation doesn't check whether a rotation schedule is already active before "creating" a new one on a secret. A secret can only hold one rotation schedule, so what seems to happen is that during the cleanup of the resources, AWS CloudFormation deletes the "old" rotation schedule, which is actually the active one.
The end result is a CloudFormation stack that contains a rotation schedule resource, but in reality there is no rotation schedule active on the Secret.
Expected Behavior
Throw an error if a rotation schedule already exist so that the stack update / create crashes.
Observed Behavior
No error is thrown but also the side effect exists of deleting a rotation schedule during cleanup that should be set.
Test Cases
Deploy a stack with a rotation schedule with logical id X
Rename the logical rotation schedule logical id X form Y
Update the stack
Confirm that the rotation schedule is disabled, but should be enabled.
Sorry abelmokadem@ - this was closed by accident. The Secrets Management team is looking into this as a part of our migration to the CloudFormation Registry.
Name of the resource
AWS::SecretsManager::RotationSchedule
Resource Name
No response
Issue Description
Like the title says, AWS CloudFormation doesn't check whether a rotation schedule is already active before "creating" a new one on a secret. A secret can only hold one rotation schedule, so what seems to happen is that during the cleanup of the resources, AWS CloudFormation deletes the "old" rotation schedule, which is actually the active one.
The end result is a CloudFormation stack that contains a rotation schedule resource, but in reality there is no rotation schedule active on the Secret.
Expected Behavior
Throw an error if a rotation schedule already exist so that the stack update / create crashes.
Observed Behavior
No error is thrown but also the side effect exists of deleting a rotation schedule during cleanup that should be set.
Test Cases
Other Details
No response