-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: aws_secretsmanager_secret_rotation switch from automatically_after_days to schedule_expression failed #30540
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I wanted to avoid two resource and count for both style of config, as our config today is with days (aws < 4.62) but want to move them to cron style. |
Same error when using the setup : dynamic "rotation_rules" {
for_each = local.t_days != null ? [1] : []
content {
automatically_after_days = local.t_days
}
}
dynamic "rotation_rules" {
for_each = local.t_schedule != null ? [1] : []
content {
schedule_expression = local.t_schedule
}
} |
Same problem when I try to change an existing schedule_expression : # module.databases_secrets["xxxx"].module.root.aws_secretsmanager_secret_rotation.rotation_schedule[0] will be updated in-place
~ rotation_rules {
~ schedule_expression = "cron(0 0 ? * SAT#1 *)" -> "cron(0 0 ? * SUN#1 *)"
# (1 unchanged attribute hidden)
}
│ Error: updating Secrets Manager Secret Rotation "arn:aws:secretsmanager:us-east-1:xxxx:secret:/monsecret-123456" : InvalidParameterException: You cannot specify both rotation frequency and schedule expression together. |
Original PR is: #30425 |
I am also affected by this.
Plan result:
Apply result:
|
Just seem to have run into this issue as well, however my plan is not even changing any of the rotation rules. I have a secret and its rotation already setup using a
|
This functionality has been released in v5.7.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Core Version
1.4.4
AWS Provider Version
4.62.0
Affected Resource(s)
Expected Behavior
In the past we only use
Now we switch to cron style schedule with :
where local.t_days is null
and
local.t_schedule = "cron(...)"
I wanted to keep the same aws_secretsmanager_secret_rotation to do an update instead of having two different resources with count for both config (days/schedule)
but during the apply I got the error :
Actual Behavior
plan return :
doesn't seems to catch the removal of automatically_after_days
and the apply gave me :
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
base on my tfvars file, local.t_days has a value and local.t_schedule is null, or local.t_days is null and local.t_schedule as a cron style schedule
Steps to Reproduce
moving from a days config (aws provider <4.62.0)
to a schedule config :
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: