Skip to content

Conversation

@stefanfreitag
Copy link
Contributor

@stefanfreitag stefanfreitag commented Mar 22, 2025

Description

When updating the database_insights_mode for a db_instance, additional details about the performance insights configuration needs to be passed along (performance_insights_enabled and performance_insights_retention_period) to the AWS API.

At the moment this additional information is missing, causing the error message

 InvalidParameterCombination: To enable the Advanced mode of Database Insights, modify your instance to enable Performance Insights and set the retention period for Performance Insights to at least 465 days.

This pull request focuses on adding the details for db_instance, but it looks like the cluster is also affected (link to source code in References section).

Relations

References

  • cluster resource, here only performance_insights_enabled is added to the input.

Output from Acceptance Testing

I enhanced an already existing test for the database_insights_mode to address the case of non-changing performance insights log retention when updating from standard to advanced mode.

❯ make testacc TESTS=TestAccRDSInstance_PerformanceInsights_databaseInsightsMode PKG=rds
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.7 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSInstance_PerformanceInsights_databaseInsightsMode'  -timeout 360m -vet=off
2025/03/22 17:59:30 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSInstance_PerformanceInsights_databaseInsightsMode
=== PAUSE TestAccRDSInstance_PerformanceInsights_databaseInsightsMode
=== CONT  TestAccRDSInstance_PerformanceInsights_databaseInsightsMode
--- PASS: TestAccRDSInstance_PerformanceInsights_databaseInsightsMode (1161.44s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/rds        1161.645s

@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • 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 needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/rds Issues and PRs that pertain to the rds service. size/S Managed by automation to categorize the size of a PR. labels Mar 22, 2025
@stefanfreitag stefanfreitag marked this pull request as ready for review March 22, 2025 20:35
@stefanfreitag stefanfreitag requested a review from a team as a code owner March 22, 2025 20:35
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Mar 23, 2025
@ewbankkit ewbankkit self-assigned this Mar 23, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 23, 2025
Copy link
Contributor

@ewbankkit ewbankkit left a 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_databaseInsightsMode' PKG=rds
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.7 test ./internal/service/rds/... -v -count 1 -parallel 20  -run=TestAccRDSInstance_PerformanceInsights_databaseInsightsMode -timeout 360m -vet=off
2025/03/23 18:23:12 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSInstance_PerformanceInsights_databaseInsightsMode
=== PAUSE TestAccRDSInstance_PerformanceInsights_databaseInsightsMode
=== CONT  TestAccRDSInstance_PerformanceInsights_databaseInsightsMode
--- PASS: TestAccRDSInstance_PerformanceInsights_databaseInsightsMode (1135.51s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	1141.457s

@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Mar 24, 2025
@ewbankkit
Copy link
Contributor

@stefanfreitag Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 9a5c0f5 into hashicorp:main Mar 24, 2025
44 checks passed
@github-actions
Copy link
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.93.0 milestone Mar 24, 2025
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 27, 2025
@stefanfreitag stefanfreitag deleted the b-db_instance-fix-database-insights-mode-update branch March 29, 2025 19:54
@github-actions
Copy link
Contributor

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 Apr 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service. size/S 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.

[Bug]: Changing database_insights_mode from standard to advanced fails for db_instance

2 participants