Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Snyk fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bushong1 committed Dec 21, 2023
1 parent 99a3968 commit d2b9316
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ No modules.
| <a name="input_parameter_group_name"></a> [parameter\_group\_name](#input\_parameter\_group\_name) | n/a | `string` | `""` | no |
| <a name="input_port"></a> [port](#input\_port) | n/a | `number` | `6379` | no |
| <a name="input_security_group_ids"></a> [security\_group\_ids](#input\_security\_group\_ids) | n/a | `list(string)` | `[]` | no |
| <a name="input_snapshot_retention_limit"></a> [snapshot\_retention\_limit](#input\_snapshot\_retention\_limit) | The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. | `number` | `7` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | n/a | `map(string)` | <pre>{<br> "Owner": "Batcave"<br>}</pre> | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | n/a | `string` | n/a | yes |

Expand Down
24 changes: 11 additions & 13 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ terraform {
}

resource "aws_elasticache_cluster" "redis" {
cluster_id = var.cluster_id
engine = var.engine
engine_version = var.engine_version
node_type = var.node_type
num_cache_nodes = var.num_cache_nodes
parameter_group_name = var.parameter_group_name
port = var.port
security_group_ids = var.security_group_ids

subnet_group_name = aws_subnet.private.name


tags = var.tags
cluster_id = var.cluster_id
engine = var.engine
engine_version = var.engine_version
node_type = var.node_type
num_cache_nodes = var.num_cache_nodes
parameter_group_name = var.parameter_group_name
port = var.port
security_group_ids = var.security_group_ids
subnet_group_name = aws_subnet.private.name
tags = var.tags
snapshot_retention_limit = var.snapshot_retention_limit
}

resource "aws_subnet" "private" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ variable "tags" {
Owner = "Batcave"
}
}

variable "snapshot_retention_limit" {
type = number
default = 7
description = "The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted."
}

0 comments on commit d2b9316

Please sign in to comment.