Skip to content
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

Add rotate_immediately argument to secret rotation #35105

Merged
merged 6 commits into from
Jan 12, 2024

Conversation

obounaim
Copy link
Contributor

@obounaim obounaim commented Jan 2, 2024

Description

Add support for the rotate_immediatley argument for the resource aws_secretsmanager_secret_rotation

Relations

Closes #34961

References

AWS SDK V1

Output from Acceptance Testing

make testacc TESTS=TestAccSecretsManagerSecretRotation_ PKG=secretsmanager
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/secretsmanager/... -v -count 1 -parallel 20 -run='TestAccSecretsManagerSecretRotation_'  -timeout 360m
=== RUN   TestAccSecretsManagerSecretRotation_basic
=== PAUSE TestAccSecretsManagerSecretRotation_basic
=== RUN   TestAccSecretsManagerSecretRotation_rotateImmediately
=== PAUSE TestAccSecretsManagerSecretRotation_rotateImmediately
=== RUN   TestAccSecretsManagerSecretRotation_scheduleExpression
=== PAUSE TestAccSecretsManagerSecretRotation_scheduleExpression
=== RUN   TestAccSecretsManagerSecretRotation_scheduleExpressionToDays
=== PAUSE TestAccSecretsManagerSecretRotation_scheduleExpressionToDays
=== RUN   TestAccSecretsManagerSecretRotation_scheduleExpressionHours
=== PAUSE TestAccSecretsManagerSecretRotation_scheduleExpressionHours
=== RUN   TestAccSecretsManagerSecretRotation_duration
=== PAUSE TestAccSecretsManagerSecretRotation_duration
=== CONT  TestAccSecretsManagerSecretRotation_basic
=== CONT  TestAccSecretsManagerSecretRotation_scheduleExpressionToDays
=== CONT  TestAccSecretsManagerSecretRotation_scheduleExpression
=== CONT  TestAccSecretsManagerSecretRotation_rotateImmediately
=== CONT  TestAccSecretsManagerSecretRotation_duration
=== CONT  TestAccSecretsManagerSecretRotation_scheduleExpressionHours
--- PASS: TestAccSecretsManagerSecretRotation_duration (46.55s)
--- PASS: TestAccSecretsManagerSecretRotation_rotateImmediately (59.33s)
--- PASS: TestAccSecretsManagerSecretRotation_scheduleExpressionHours (64.82s)
--- PASS: TestAccSecretsManagerSecretRotation_basic (65.22s)
--- PASS: TestAccSecretsManagerSecretRotation_scheduleExpression (67.53s)
--- PASS: TestAccSecretsManagerSecretRotation_scheduleExpressionToDays (83.56s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/secretsmanager     83.658s

Copy link

github-actions bot commented Jan 2, 2024

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/secretsmanager Issues and PRs that pertain to the secretsmanager service. labels Jan 2, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 2, 2024
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed size/XS Managed by automation to categorize the size of a PR. labels Jan 4, 2024
@obounaim obounaim marked this pull request as ready for review January 4, 2024 10:22
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 8, 2024
@ewbankkit
Copy link
Contributor

@obounaim Thanks for the contribution 🎉 👏.
This work has been rolled into #35174.

@ewbankkit ewbankkit merged commit 75e2768 into hashicorp:main Jan 12, 2024
62 checks passed
@github-actions github-actions bot added this to the v5.33.0 milestone Jan 12, 2024
Copy link

This functionality has been released in v5.33.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!

"rotate_immediately": {
Type: schema.TypeBool,
Optional: true,
Default: true,
Copy link

@MagikHands MagikHands Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown doc says this should default to false. I believe this is causing all newly made secrets (potentially just all terraform apply's) to try to rotate immediately, potentially causing issues or unexpected results.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MagikHands, this should be an error in documentation.
The default behavior should be set to true, just as the SDK.

The original issue mentioned to have the possibility to disable this default behavior.
Github issue

If you agree with this please open a new issue to update documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MagikHands, I have create an issue to report this : #35702

Copy link

github-actions bot commented Mar 9, 2024

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/secretsmanager Issues and PRs that pertain to the secretsmanager service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add RotateImmediately to aws_secretsmanager_secret_rotation
4 participants