Skip to content

Commit

Permalink
Fix performance insights retention period (#21)
Browse files Browse the repository at this point in the history
* fix: retention period for performance insights needs to be null

* chore: update changelog
  • Loading branch information
Ohid25 authored Jan 10, 2024
1 parent 4f4efac commit 57dd753
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ All notable changes to this project will be documented in this file.
<a name="unreleased"></a>
## [Unreleased]

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


<a name="3.4.0"></a>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ No modules.
| <a name="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix) | Prefix Name used across all resources | `string` | n/a | yes |
| <a name="input_network_type"></a> [network\_type](#input\_network\_type) | Network type of the cluster. Valid values: IPV4, DUAL. | `string` | `null` | no |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_port"></a> [port](#input\_port) | The port on which to accept connections | `string` | `""` | no |
| <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 |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ resource "aws_rds_cluster_instance" "main" {
auto_minor_version_upgrade = var.auto_minor_version_upgrade
performance_insights_enabled = var.performance_insights_enabled
performance_insights_kms_key_id = var.performance_insights_kms_key_id
performance_insights_retention_period = try(var.performance_insights_retention_period, 7)
performance_insights_retention_period = var.performance_insights_retention_period
ca_cert_identifier = var.ca_cert_identifier

tags = merge(
Expand Down
10 changes: 5 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -242,21 +242,21 @@ variable "tags" {
}

variable "performance_insights_enabled" {
description = "Specifies whether Performance Insights is enabled or not."
description = "specifies whether performance insights is enabled or not."
type = bool
default = false
}

variable "performance_insights_kms_key_id" {
description = "The ARN for the KMS key to encrypt Performance Insights data."
description = "the arn for the kms key to encrypt performance insights data."
type = string
default = null
}

variable "performance_insights_retention_period" {
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."
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."
type = number
default = 7
default = null
}

variable "iam_database_authentication_enabled" {
Expand Down Expand Up @@ -468,4 +468,4 @@ variable "network_type" {
description = "Network type of the cluster. Valid values: IPV4, DUAL."
type = string
default = null
}
}

0 comments on commit 57dd753

Please sign in to comment.