From e69006ea69e9acff908d900b51a4f8390968ad6b Mon Sep 17 00:00:00 2001
From: Leonardo Jardim <68306312+leojaardim@users.noreply.github.com>
Date: Wed, 13 Mar 2024 19:13:39 -0300
Subject: [PATCH] fix: Improvements (#9)
---
README.md | 10 +++++-----
main.tf | 2 +-
variables.tf | 14 +++++++-------
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/README.md b/README.md
index 30b3e3d..0563d16 100644
--- a/README.md
+++ b/README.md
@@ -173,17 +173,17 @@ To-do:
| [create\_cache\_password](#input\_create\_cache\_password) | Create the password? | `bool` | `false` | no |
| [create\_elasticache\_parameter\_group](#input\_create\_elasticache\_parameter\_group) | Create the parameter group? | `bool` | `false` | no |
| [create\_elasticache\_replication\_group](#input\_create\_elasticache\_replication\_group) | Create the replication group? | `bool` | `false` | no |
-| [create\_elasticache\_serveless](#input\_create\_elasticache\_serveless) | Create the elasticache Redis Serveless? | `bool` | `false` | no |
+| [create\_elasticache\_serverless](#input\_create\_elasticache\_serverless) | Create the elasticache Redis serverless? | `bool` | `false` | no |
| [create\_elasticache\_subnet\_group](#input\_create\_elasticache\_subnet\_group) | Create the subnet group? | `bool` | `false` | no |
| [create\_elasticache\_user](#input\_create\_elasticache\_user) | Create the user? | `bool` | `false` | no |
| [create\_elasticache\_user\_group](#input\_create\_elasticache\_user\_group) | Create the user group? | `bool` | `false` | no |
-| [daily\_snapshot\_time](#input\_daily\_snapshot\_time) | The daily time that snapshots will be created from the new serverless cache.(Only for the Serveless module) | `string` | `null` | no |
+| [daily\_snapshot\_time](#input\_daily\_snapshot\_time) | The daily time that snapshots will be created from the new serverless cache.(Only for the serverless module) | `string` | `null` | no |
| [data\_tiering\_enabled](#input\_data\_tiering\_enabled) | Enables data tiering | `bool` | `false` | no |
| [description\_parameter](#input\_description\_parameter) | The description of the ElastiCache parameter group. | `string` | `null` | no |
| [description\_redis](#input\_description\_redis) | User-created description for the replication group. Must not be empty | `string` | `""` | no |
| [description\_serverless](#input\_description\_serverless) | User-created description for the serverless. Must not be empty | `string` | `""` | no |
| [description\_subnet](#input\_description\_subnet) | The Description of the ElastiCache Subnet Group. | `string` | `null` | no |
-| [enabled\_limits](#input\_enabled\_limits) | Enable customization of cache\_usage\_limits(Only for the Serveless module) | `bool` | `false` | no |
+| [enabled\_limits](#input\_enabled\_limits) | Enable customization of cache\_usage\_limits(Only for the serverless module) | `bool` | `false` | no |
| [engine](#input\_engine) | Name of the cache engine to be used for the clusters in this replication group. | `string` | `"redis"` | no |
| [engine\_version](#input\_engine\_version) | Version number of the cache engine to be used for the cache clusters in this replication group. | `string` | `"6.x"` | no |
| [family](#input\_family) | The family of the ElastiCache parameter group. | `string` | `"redis6.x"` | no |
@@ -192,7 +192,7 @@ To-do:
| [kms\_key\_id](#input\_kms\_key\_id) | The ARN of the key that you wish to use if encrypting at rest. | `string` | `null` | no |
| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Log | `list(map(string))` | `[]` | no |
| [maintenance\_window](#input\_maintenance\_window) | Specifies the weekly time range for when maintenance on the cache cluster is performed. | `string` | `"sat:03:00-sat:06:00"` | no |
-| [major\_engine\_version](#input\_major\_engine\_version) | The version of the cache engine that will be used to create the serverless cache.(Only for the Serveless module) | `string` | `"7"` | no |
+| [major\_engine\_version](#input\_major\_engine\_version) | The version of the cache engine that will be used to create the serverless cache.(Only for the serverless module) | `string` | `"7"` | no |
| [multi\_az\_enabled](#input\_multi\_az\_enabled) | Specifies whether to enable Multi-AZ Support for the replication group. | `bool` | `false` | no |
| [node\_type](#input\_node\_type) | Instance class to be used. | `string` | `null` | no |
| [notification\_topic\_arn](#input\_notification\_topic\_arn) | ARN of an SNS topic to send ElastiCache notifications to | `string` | `null` | no |
@@ -210,7 +210,7 @@ To-do:
| [security\_group\_ids](#input\_security\_group\_ids) | One or more Amazon VPC security groups associated with this replication group. | `list(string)` | `[]` | no |
| [security\_group\_names](#input\_security\_group\_names) | List of cache security group names to associate with this replication group. | `list(string)` | `null` | no |
| [serverless\_name](#input\_serverless\_name) | Name Redis Serverless. This parameter is stored as a lowercase string. | `string` | `null` | no |
-| [snapshot\_arns\_to\_restore](#input\_snapshot\_arns\_to\_restore) | The list of ARN(s) of the snapshot that the new serverless cache will be created from(Only for the Serveless module) | `list(string)` | `null` | no |
+| [snapshot\_arns\_to\_restore](#input\_snapshot\_arns\_to\_restore) | The list of ARN(s) of the snapshot that the new serverless cache will be created from(Only for the serverless module) | `list(string)` | `null` | no |
| [snapshot\_name](#input\_snapshot\_name) | Name of a snapshot from which to restore data into the new node group. | `string` | `null` | no |
| [snapshot\_retention\_limit](#input\_snapshot\_retention\_limit) | Number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. | `number` | `7` | no |
| [snapshot\_window](#input\_snapshot\_window) | Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. | `string` | `"00:00-02:00"` | no |
diff --git a/main.tf b/main.tf
index 39f64e5..8e7bb42 100644
--- a/main.tf
+++ b/main.tf
@@ -118,7 +118,7 @@ module "elasticache_user_group" {
tags = var.tags
}
resource "aws_elasticache_serverless_cache" "this" {
- count = var.create_elasticache_serveless ? 1 : 0
+ count = var.create_elasticache_serverless ? 1 : 0
engine = var.engine
name = lower(var.serverless_name)
diff --git a/variables.tf b/variables.tf
index 0eaf9c8..fa04e8d 100644
--- a/variables.tf
+++ b/variables.tf
@@ -10,10 +10,10 @@ variable "create_cache" {
default = false
description = "Create the elasticache Redis?"
}
-variable "create_elasticache_serveless" {
+variable "create_elasticache_serverless" {
type = bool
default = false
- description = "Create the elasticache Redis Serveless?"
+ description = "Create the elasticache Redis serverless?"
}
variable "create_elasticache_replication_group" {
type = bool
@@ -50,7 +50,7 @@ variable "create_cache_password" {
description = "Create the password?"
}
##############################################################################################
-#Redis Serveless
+#Redis serverless
variable "serverless_name" {
type = string
default = null
@@ -60,13 +60,13 @@ variable "serverless_name" {
variable "daily_snapshot_time" {
type = string
default = null
- description = " The daily time that snapshots will be created from the new serverless cache.(Only for the Serveless module)"
+ description = " The daily time that snapshots will be created from the new serverless cache.(Only for the serverless module)"
}
variable "snapshot_arns_to_restore" {
type = list(string)
default = null
- description = "The list of ARN(s) of the snapshot that the new serverless cache will be created from(Only for the Serveless module)"
+ description = "The list of ARN(s) of the snapshot that the new serverless cache will be created from(Only for the serverless module)"
}
variable "cache_usage_limits" {
@@ -78,13 +78,13 @@ variable "cache_usage_limits" {
variable "enabled_limits" {
type = bool
default = false
- description = "Enable customization of cache_usage_limits(Only for the Serveless module)"
+ description = "Enable customization of cache_usage_limits(Only for the serverless module)"
}
variable "major_engine_version" {
type = string
default = "7"
- description = "The version of the cache engine that will be used to create the serverless cache.(Only for the Serveless module)"
+ description = "The version of the cache engine that will be used to create the serverless cache.(Only for the serverless module)"
}
variable "description_serverless" {
type = string