diff --git a/CHANGELOG.md b/CHANGELOG.md index dcc4f3a..e16cf07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ All notable changes to this project will be documented in this file. ## [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)) diff --git a/README.md b/README.md index d597a0a..071f4da 100644 --- a/README.md +++ b/README.md @@ -177,9 +177,9 @@ No modules. | [name\_prefix](#input\_name\_prefix) | Prefix Name used across all resources | `string` | n/a | yes | | [network\_type](#input\_network\_type) | Network type of the cluster. Valid values: IPV4, DUAL. | `string` | `null` | no | | [parameters](#input\_parameters) | A list of parameter objects |
list(object({| `[]` | no | -| [performance\_insights\_enabled](#input\_performance\_insights\_enabled) | Specifies whether Performance Insights is enabled or not. | `bool` | `false` | no | -| [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 | -| [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 | +| [performance\_insights\_enabled](#input\_performance\_insights\_enabled) | specifies whether performance insights is enabled or not. | `bool` | `false` | no | +| [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 | +| [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 | | [permissions\_boundary](#input\_permissions\_boundary) | The ARN of the policy that is used to set the permissions boundary for the role. | `string` | `null` | no | | [port](#input\_port) | The port on which to accept connections | `string` | `""` | no | | [predefined\_metric\_type](#input\_predefined\_metric\_type) | The metric type to scale on. Valid values are RDSReaderAverageCPUUtilization and RDSReaderAverageDatabaseConnections. | `string` | `"RDSReaderAverageCPUUtilization"` | no | diff --git a/main.tf b/main.tf index b7ad2d8..4758434 100644 --- a/main.tf +++ b/main.tf @@ -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( diff --git a/variables.tf b/variables.tf index 822c252..66cfcb3 100644 --- a/variables.tf +++ b/variables.tf @@ -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" { @@ -468,4 +468,4 @@ variable "network_type" { description = "Network type of the cluster. Valid values: IPV4, DUAL." type = string default = null -} \ No newline at end of file +}
name = string
value = string
}))