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: | <a name="input_create_cache_password"></a> [create\_cache\_password](#input\_create\_cache\_password) | Create the password? | `bool` | `false` | no | | <a name="input_create_elasticache_parameter_group"></a> [create\_elasticache\_parameter\_group](#input\_create\_elasticache\_parameter\_group) | Create the parameter group? | `bool` | `false` | no | | <a name="input_create_elasticache_replication_group"></a> [create\_elasticache\_replication\_group](#input\_create\_elasticache\_replication\_group) | Create the replication group? | `bool` | `false` | no | -| <a name="input_create_elasticache_serveless"></a> [create\_elasticache\_serveless](#input\_create\_elasticache\_serveless) | Create the elasticache Redis Serveless? | `bool` | `false` | no | +| <a name="input_create_elasticache_serverless"></a> [create\_elasticache\_serverless](#input\_create\_elasticache\_serverless) | Create the elasticache Redis serverless? | `bool` | `false` | no | | <a name="input_create_elasticache_subnet_group"></a> [create\_elasticache\_subnet\_group](#input\_create\_elasticache\_subnet\_group) | Create the subnet group? | `bool` | `false` | no | | <a name="input_create_elasticache_user"></a> [create\_elasticache\_user](#input\_create\_elasticache\_user) | Create the user? | `bool` | `false` | no | | <a name="input_create_elasticache_user_group"></a> [create\_elasticache\_user\_group](#input\_create\_elasticache\_user\_group) | Create the user group? | `bool` | `false` | no | -| <a name="input_daily_snapshot_time"></a> [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 | +| <a name="input_daily_snapshot_time"></a> [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 | | <a name="input_data_tiering_enabled"></a> [data\_tiering\_enabled](#input\_data\_tiering\_enabled) | Enables data tiering | `bool` | `false` | no | | <a name="input_description_parameter"></a> [description\_parameter](#input\_description\_parameter) | The description of the ElastiCache parameter group. | `string` | `null` | no | | <a name="input_description_redis"></a> [description\_redis](#input\_description\_redis) | User-created description for the replication group. Must not be empty | `string` | `""` | no | | <a name="input_description_serverless"></a> [description\_serverless](#input\_description\_serverless) | User-created description for the serverless. Must not be empty | `string` | `""` | no | | <a name="input_description_subnet"></a> [description\_subnet](#input\_description\_subnet) | The Description of the ElastiCache Subnet Group. | `string` | `null` | no | -| <a name="input_enabled_limits"></a> [enabled\_limits](#input\_enabled\_limits) | Enable customization of cache\_usage\_limits(Only for the Serveless module) | `bool` | `false` | no | +| <a name="input_enabled_limits"></a> [enabled\_limits](#input\_enabled\_limits) | Enable customization of cache\_usage\_limits(Only for the serverless module) | `bool` | `false` | no | | <a name="input_engine"></a> [engine](#input\_engine) | Name of the cache engine to be used for the clusters in this replication group. | `string` | `"redis"` | no | | <a name="input_engine_version"></a> [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 | | <a name="input_family"></a> [family](#input\_family) | The family of the ElastiCache parameter group. | `string` | `"redis6.x"` | no | @@ -192,7 +192,7 @@ To-do: | <a name="input_kms_key_id"></a> [kms\_key\_id](#input\_kms\_key\_id) | The ARN of the key that you wish to use if encrypting at rest. | `string` | `null` | no | | <a name="input_log_delivery_configuration"></a> [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 | | <a name="input_maintenance_window"></a> [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 | -| <a name="input_major_engine_version"></a> [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 | +| <a name="input_major_engine_version"></a> [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 | | <a name="input_multi_az_enabled"></a> [multi\_az\_enabled](#input\_multi\_az\_enabled) | Specifies whether to enable Multi-AZ Support for the replication group. | `bool` | `false` | no | | <a name="input_node_type"></a> [node\_type](#input\_node\_type) | Instance class to be used. | `string` | `null` | no | | <a name="input_notification_topic_arn"></a> [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: | <a name="input_security_group_ids"></a> [security\_group\_ids](#input\_security\_group\_ids) | One or more Amazon VPC security groups associated with this replication group. | `list(string)` | `[]` | no | | <a name="input_security_group_names"></a> [security\_group\_names](#input\_security\_group\_names) | List of cache security group names to associate with this replication group. | `list(string)` | `null` | no | | <a name="input_serverless_name"></a> [serverless\_name](#input\_serverless\_name) | Name Redis Serverless. This parameter is stored as a lowercase string. | `string` | `null` | no | -| <a name="input_snapshot_arns_to_restore"></a> [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 | +| <a name="input_snapshot_arns_to_restore"></a> [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 | | <a name="input_snapshot_name"></a> [snapshot\_name](#input\_snapshot\_name) | Name of a snapshot from which to restore data into the new node group. | `string` | `null` | no | | <a name="input_snapshot_retention_limit"></a> [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 | | <a name="input_snapshot_window"></a> [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