-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
resource/aws_secretsmanager_secret_rotation: Fix bug with updates #35024
Conversation
…was ignored if `rotation_rules.schedule_expression` was set
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccSecretsManagerSecretRotation_\|TestAccSecretsManagerSecret_\|TestAccSecretsManagerSecretVersion_' PKG=secretsmanager ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/secretsmanager/... -v -count 1 -parallel 2 -run=TestAccSecretsManagerSecretRotation_\|TestAccSecretsManagerSecret_\|TestAccSecretsManagerSecretVersion_ -timeout 360m
=== RUN TestAccSecretsManagerSecretRotation_basic
=== PAUSE TestAccSecretsManagerSecretRotation_basic
=== RUN TestAccSecretsManagerSecretRotation_scheduleExpression
=== PAUSE TestAccSecretsManagerSecretRotation_scheduleExpression
=== RUN TestAccSecretsManagerSecretRotation_scheduleExpressionToDays
=== PAUSE TestAccSecretsManagerSecretRotation_scheduleExpressionToDays
=== RUN TestAccSecretsManagerSecretRotation_scheduleExpressionHours
=== PAUSE TestAccSecretsManagerSecretRotation_scheduleExpressionHours
=== RUN TestAccSecretsManagerSecretRotation_duration
=== PAUSE TestAccSecretsManagerSecretRotation_duration
=== RUN TestAccSecretsManagerSecret_basic
=== PAUSE TestAccSecretsManagerSecret_basic
=== RUN TestAccSecretsManagerSecret_withNamePrefix
=== PAUSE TestAccSecretsManagerSecret_withNamePrefix
=== RUN TestAccSecretsManagerSecret_description
=== PAUSE TestAccSecretsManagerSecret_description
=== RUN TestAccSecretsManagerSecret_basicReplica
=== PAUSE TestAccSecretsManagerSecret_basicReplica
=== RUN TestAccSecretsManagerSecret_overwriteReplica
=== PAUSE TestAccSecretsManagerSecret_overwriteReplica
=== RUN TestAccSecretsManagerSecret_kmsKeyID
=== PAUSE TestAccSecretsManagerSecret_kmsKeyID
=== RUN TestAccSecretsManagerSecret_RecoveryWindowInDays_recreate
=== PAUSE TestAccSecretsManagerSecret_RecoveryWindowInDays_recreate
=== RUN TestAccSecretsManagerSecret_tags
=== PAUSE TestAccSecretsManagerSecret_tags
=== RUN TestAccSecretsManagerSecret_policy
=== PAUSE TestAccSecretsManagerSecret_policy
=== RUN TestAccSecretsManagerSecretVersion_basicString
=== PAUSE TestAccSecretsManagerSecretVersion_basicString
=== RUN TestAccSecretsManagerSecretVersion_base64Binary
=== PAUSE TestAccSecretsManagerSecretVersion_base64Binary
=== RUN TestAccSecretsManagerSecretVersion_versionStages
=== PAUSE TestAccSecretsManagerSecretVersion_versionStages
=== CONT TestAccSecretsManagerSecretRotation_basic
=== CONT TestAccSecretsManagerSecret_overwriteReplica
--- PASS: TestAccSecretsManagerSecretRotation_basic (50.09s)
=== CONT TestAccSecretsManagerSecret_policy
--- PASS: TestAccSecretsManagerSecret_overwriteReplica (84.07s)
=== CONT TestAccSecretsManagerSecretVersion_versionStages
--- PASS: TestAccSecretsManagerSecret_policy (52.62s)
=== CONT TestAccSecretsManagerSecretVersion_base64Binary
--- PASS: TestAccSecretsManagerSecretVersion_base64Binary (20.95s)
=== CONT TestAccSecretsManagerSecretVersion_basicString
--- PASS: TestAccSecretsManagerSecretVersion_versionStages (45.89s)
=== CONT TestAccSecretsManagerSecretRotation_scheduleExpressionHours
--- PASS: TestAccSecretsManagerSecretVersion_basicString (21.22s)
=== CONT TestAccSecretsManagerSecret_basic
--- PASS: TestAccSecretsManagerSecret_basic (19.11s)
=== CONT TestAccSecretsManagerSecretRotation_scheduleExpressionToDays
--- PASS: TestAccSecretsManagerSecretRotation_scheduleExpressionHours (61.54s)
=== CONT TestAccSecretsManagerSecret_basicReplica
--- PASS: TestAccSecretsManagerSecret_basicReplica (23.61s)
=== CONT TestAccSecretsManagerSecret_description
--- PASS: TestAccSecretsManagerSecretRotation_scheduleExpressionToDays (62.22s)
=== CONT TestAccSecretsManagerSecretRotation_duration
--- PASS: TestAccSecretsManagerSecret_description (31.25s)
=== CONT TestAccSecretsManagerSecret_RecoveryWindowInDays_recreate
--- PASS: TestAccSecretsManagerSecretRotation_duration (45.38s)
=== CONT TestAccSecretsManagerSecret_tags
--- PASS: TestAccSecretsManagerSecret_RecoveryWindowInDays_recreate (30.81s)
=== CONT TestAccSecretsManagerSecret_withNamePrefix
--- PASS: TestAccSecretsManagerSecret_withNamePrefix (19.00s)
=== CONT TestAccSecretsManagerSecretRotation_scheduleExpression
--- PASS: TestAccSecretsManagerSecret_tags (41.15s)
=== CONT TestAccSecretsManagerSecret_kmsKeyID
--- PASS: TestAccSecretsManagerSecret_kmsKeyID (32.94s)
--- PASS: TestAccSecretsManagerSecretRotation_scheduleExpression (58.07s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/secretsmanager 360.336s
This functionality has been released in v5.32.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! |
@gdavison thanks for looking into this; I've tested with v5.32.1, now schedule expression can be changed from rate to cron; still, in the apply of change from rate to cron, I got an exception with error message:
Follow-up plans see the rotation schedule has been changed on AWS, so error doesn't appear again. Not sure is there anything that can be done about this unwanted side-effect in the terraform aws provider. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Due to a
DiffSuppressFunc
, changes torotation_rules.automatically_after_days
were incorrectly ignored ifrotation_rules.schedule_expression
was set.Also adds required
ClientRequestToken
for idempotent requests.Output from Acceptance Testing