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

Unable to set performance_insights_enabled to false #158

Open
kris-Nabis opened this issue Jan 26, 2023 · 1 comment
Open

Unable to set performance_insights_enabled to false #158

kris-Nabis opened this issue Jan 26, 2023 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@kris-Nabis
Copy link

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Unable to set the variable performance_insights_enabled to false. While set to false Terraform throws the following error:

Error: creating RDS Cluster (dev-db) Instance (dev-db-1): InvalidParameterCombination: To enable Performance Insights, EnablePerformanceInsights must be set to 'true'

Expected Behavior

In our dev environment we may not want to enable performance insights in order to save money. I would have expected to be able to tell the module to set it to false. it would be great if we could make this a bit more dynamic.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a rds_cluster/aws module
  2. set performance_insights_enabled to false
  3. Run terraform apply
  4. See error
Error: creating RDS Cluster (dev-db) Instance (dev-db-1): InvalidParameterCombination: To enable Performance Insights, EnablePerformanceInsights must be set to 'true'

Screenshots

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

Alpine linux
terraform 1.2.5

@kris-Nabis kris-Nabis added the bug 🐛 An issue with the system label Jan 26, 2023
@kevle1
Copy link

kevle1 commented May 28, 2024

For anyone coming across this, when any other performance_insights_... options are specified, performance_insights_enabled must be true. In order to set performance_insights_enabled to false, the options must be null or unspecified. E.g.:

  performance_insights_enabled          = local.performance_insights_enabled
  performance_insights_retention_period = local.performance_insights_enabled ? 31 : null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

2 participants