-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws_secretsmanager): automaticallyAfter is not disabling the automatic rotation of secrets #27460
Comments
Yes @mrlikl , I can confirm that setting duration.days(0) does not disable the rotation schedule and removes the property only. here is a snippet of the deployed stack - However if you want to disable the rotation schedule, you could proceed with not adding the rotation schedule at all. Marking this bug as P2. |
@mrlikl could you link the docs that state automatic rotation is disabled by setting What is the use case for disabling automatic rotation in this way rather than not adding a rotation schedule in the first place? |
While the underlying API states a minimum value of 1, CDK doc had the above-mentioned. Hence, this was raised as a bug. Removing the rotation schedule is working as expected. Maybe the CDK doc needs to be updated or the AWS::SecretsManager::RotationSchedule resource is removed completely if Duration.days(0) |
@mrlikl yes, apologies, I was just in the process of changing my comment since I found the previous PR & doc string. I read through this original issue request (here) and the comments on the PR (here). Correct me if I am wrong, but I believe that the current behavior is working as intended. The 'magic' value on
So this is not affecting the actual rotation of your secrets correct? I do agree the doc string could be much clearer. This workaround looks to me to be an easy way to give the lambda all the correct permissions and setting up easy manual rotation. |
I will submit another PR for modifying the doc.
I was misunderstood. I understood that there is a use case for deleting only RotationRules. I will just modify the document. |
I believe this is due to behaviour/logic change of I want to confirm whether removing the property |
…e is 0 is wrong (#27570) We discussed that the doc when `automaticallyAfter` for `RotationSchedule` is `Duration.days(0)` is wrong. So I modified the doc. See the issue (#27460) and another PR (#27497 (comment)). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Have confirmed internally that the behaviour was the same since beginning. That is removing the property |
Yes, it's the same as what it is now. At first, I submitted the PR to remove So my PR was closed, and I submitted a new PR for fixing the doc. |
It seems that there is a use case for deleting RotationRules only. |
Describe the bug
As per doc, if the property automaticallyAfter is set to Duration.days(0) then it should disable automatic rotation, however it is removing the property
from the resource AWS::SecretsManager::RotationSchedule
Expected Behavior
The resource AWS::SecretsManager::RotationSchedule completely removed from the stack template which will make the call API CancelRotateSecret
Current Behavior
It is removing the below property which is not making any change in the secret's rotation.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.97.1
Framework Version
No response
Node.js Version
20.7.0
OS
macos
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: