-
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
[Enhancement] : Validation function for RDS performance_insights_retention_period attribute #35870
Conversation
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=TestAccRDSInstance_PerformanceInsights\|TestAccRDSInstance_basic' PKG=rds ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 3 -run=TestAccRDSInstance_PerformanceInsights\|TestAccRDSInstance_basic -timeout 360m
=== RUN TestAccRDSInstance_basic
=== PAUSE TestAccRDSInstance_basic
=== RUN TestAccRDSInstance_PerformanceInsights_disabledToEnabled
=== PAUSE TestAccRDSInstance_PerformanceInsights_disabledToEnabled
=== RUN TestAccRDSInstance_PerformanceInsights_enabledToDisabled
=== PAUSE TestAccRDSInstance_PerformanceInsights_enabledToDisabled
=== RUN TestAccRDSInstance_PerformanceInsights_kmsKeyID
=== PAUSE TestAccRDSInstance_PerformanceInsights_kmsKeyID
=== RUN TestAccRDSInstance_PerformanceInsights_retentionPeriod
=== PAUSE TestAccRDSInstance_PerformanceInsights_retentionPeriod
=== CONT TestAccRDSInstance_basic
=== CONT TestAccRDSInstance_PerformanceInsights_kmsKeyID
=== CONT TestAccRDSInstance_PerformanceInsights_enabledToDisabled
--- PASS: TestAccRDSInstance_basic (510.57s)
=== CONT TestAccRDSInstance_PerformanceInsights_disabledToEnabled
--- PASS: TestAccRDSInstance_PerformanceInsights_enabledToDisabled (857.28s)
=== CONT TestAccRDSInstance_PerformanceInsights_retentionPeriod
--- PASS: TestAccRDSInstance_PerformanceInsights_kmsKeyID (1037.58s)
--- PASS: TestAccRDSInstance_PerformanceInsights_disabledToEnabled (726.33s)
--- PASS: TestAccRDSInstance_PerformanceInsights_retentionPeriod (785.40s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 1654.292s
@Jebaseelanravi Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.38.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! |
[#187103734](https://www.pivotaltracker.com/story/show/187103734) Recently, a new PR for validating this property was merged: hashicorp/terraform-provider-aws#35870 I believe it's valuable to have our tests break when changes like this are introduced in the providers. Therefore, we should try have behaviours such as this encoded in our tests. Things like: "invalid values for property X are not validated by TF".
[#187103734](https://www.pivotaltracker.com/story/show/187103734) Recently, a new PR for validating this property was merged: hashicorp/terraform-provider-aws#35870 I believe it's valuable to have our tests break when changes like this are introduced in the providers. Therefore, we should try have behaviours such as this encoded in our tests. Things like: "invalid values for property X are not validated by TF".
[#187103734](https://www.pivotaltracker.com/story/show/187103734) Recently, a new PR for validating this property was merged: hashicorp/terraform-provider-aws#35870 I believe it's valuable to have our tests break when changes like this are introduced in the providers. Therefore, we should try have behaviours such as this encoded in our tests. Things like: "invalid values for property X are not validated by TF".
[#187103734](https://www.pivotaltracker.com/story/show/187103734) Recently, a new PR for validating this property was merged: hashicorp/terraform-provider-aws#35870 I believe it's valuable to have our tests break when changes like this are introduced in the providers. Therefore, we should try have behaviours such as this encoded in our tests. Things like: "invalid values for property X are not validated by TF".
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
The valid values for the performance insights retention period are 7, 731 (2 years) or a multiple of 31. This is properly documented. However, in case of an invalid value terraform plan does not complain, you will get the error only after trying to apply the change.
Terraform will perform the following actions:
Relations
Closes #34342
References
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_retention_period
Output from Acceptance Testing