Skip to content

Commit 57dd753

Browse files
author
Abdul Wahid
authored
Fix performance insights retention period (#21)
* fix: retention period for performance insights needs to be null * chore: update changelog
1 parent 4f4efac commit 57dd753

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ All notable changes to this project will be documented in this file.
55
<a name="unreleased"></a>
66
## [Unreleased]
77

8-
- Add performance insights retention period
8+
- fix: retention period for performance insights needs to be null
9+
- Add 'performance_insights_retention_period' ([#20](https://github.com/umotif-public/terraform-aws-rds-aurora/issues/20))
910

1011

1112
<a name="3.4.0"></a>

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ No modules.
177177
| <a name="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix) | Prefix Name used across all resources | `string` | n/a | yes |
178178
| <a name="input_network_type"></a> [network\_type](#input\_network\_type) | Network type of the cluster. Valid values: IPV4, DUAL. | `string` | `null` | no |
179179
| <a name="input_parameters"></a> [parameters](#input\_parameters) | A list of parameter objects | <pre>list(object({<br> name = string<br> value = string<br> }))</pre> | `[]` | no |
180-
| <a name="input_performance_insights_enabled"></a> [performance\_insights\_enabled](#input\_performance\_insights\_enabled) | Specifies whether Performance Insights is enabled or not. | `bool` | `false` | no |
181-
| <a name="input_performance_insights_kms_key_id"></a> [performance\_insights\_kms\_key\_id](#input\_performance\_insights\_kms\_key\_id) | The ARN for the KMS key to encrypt Performance Insights data. | `string` | `null` | no |
182-
| <a name="input_performance_insights_retention_period"></a> [performance\_insights\_retention\_period](#input\_performance\_insights\_retention\_period) | Amount of time in days to retain Performance Insights data. Valid values are 7, 731 (2 years) or a multiple of 31. When specifying performance\_insights\_retention\_period, performance\_insights\_enabled needs to be set to true. | `number` | `7` | no |
180+
| <a name="input_performance_insights_enabled"></a> [performance\_insights\_enabled](#input\_performance\_insights\_enabled) | specifies whether performance insights is enabled or not. | `bool` | `false` | no |
181+
| <a name="input_performance_insights_kms_key_id"></a> [performance\_insights\_kms\_key\_id](#input\_performance\_insights\_kms\_key\_id) | the arn for the kms key to encrypt performance insights data. | `string` | `null` | no |
182+
| <a name="input_performance_insights_retention_period"></a> [performance\_insights\_retention\_period](#input\_performance\_insights\_retention\_period) | amount of time in days to retain performance insights data. valid values are 7, 731 (2 years) or a multiple of 31. when specifying performance\_insights\_retention\_period, performance\_insights\_enabled needs to be set to true. | `number` | `null` | no |
183183
| <a name="input_permissions_boundary"></a> [permissions\_boundary](#input\_permissions\_boundary) | The ARN of the policy that is used to set the permissions boundary for the role. | `string` | `null` | no |
184184
| <a name="input_port"></a> [port](#input\_port) | The port on which to accept connections | `string` | `""` | no |
185185
| <a name="input_predefined_metric_type"></a> [predefined\_metric\_type](#input\_predefined\_metric\_type) | The metric type to scale on. Valid values are RDSReaderAverageCPUUtilization and RDSReaderAverageDatabaseConnections. | `string` | `"RDSReaderAverageCPUUtilization"` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ resource "aws_rds_cluster_instance" "main" {
330330
auto_minor_version_upgrade = var.auto_minor_version_upgrade
331331
performance_insights_enabled = var.performance_insights_enabled
332332
performance_insights_kms_key_id = var.performance_insights_kms_key_id
333-
performance_insights_retention_period = try(var.performance_insights_retention_period, 7)
333+
performance_insights_retention_period = var.performance_insights_retention_period
334334
ca_cert_identifier = var.ca_cert_identifier
335335

336336
tags = merge(

variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,21 +242,21 @@ variable "tags" {
242242
}
243243

244244
variable "performance_insights_enabled" {
245-
description = "Specifies whether Performance Insights is enabled or not."
245+
description = "specifies whether performance insights is enabled or not."
246246
type = bool
247247
default = false
248248
}
249249

250250
variable "performance_insights_kms_key_id" {
251-
description = "The ARN for the KMS key to encrypt Performance Insights data."
251+
description = "the arn for the kms key to encrypt performance insights data."
252252
type = string
253253
default = null
254254
}
255255

256256
variable "performance_insights_retention_period" {
257-
description = "Amount of time in days to retain Performance Insights data. Valid values are 7, 731 (2 years) or a multiple of 31. When specifying performance_insights_retention_period, performance_insights_enabled needs to be set to true."
257+
description = "amount of time in days to retain performance insights data. valid values are 7, 731 (2 years) or a multiple of 31. when specifying performance_insights_retention_period, performance_insights_enabled needs to be set to true."
258258
type = number
259-
default = 7
259+
default = null
260260
}
261261

262262
variable "iam_database_authentication_enabled" {
@@ -468,4 +468,4 @@ variable "network_type" {
468468
description = "Network type of the cluster. Valid values: IPV4, DUAL."
469469
type = string
470470
default = null
471-
}
471+
}

0 commit comments

Comments
 (0)