Skip to content

Commit a22e0bd

Browse files
authored
Merge pull request #5 from SPHTech-Platform/update-default-vars
Update default variables and behaviour
2 parents fe36fc4 + 3de14d0 commit a22e0bd

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Diff for: .pre-commit-config.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/gruntwork-io/pre-commit
3-
rev: v0.1.17
3+
rev: v0.1.22
44
hooks:
55
- id: terraform-fmt
66
- id: terraform-validate
@@ -12,17 +12,19 @@ repos:
1212
- id: shellcheck
1313

1414
- repo: https://github.com/antonbabenko/pre-commit-terraform
15-
rev: v1.64.0
15+
rev: v1.81.0
1616
hooks:
1717
- id: terraform_docs
1818
args:
19-
- "--args=--lockfile=false"
19+
- --hook-config=--path-to-file=README.md
20+
- --hook-config=--add-to-existing-file=true
21+
- --hook-config=--recursive=true
2022
- id: terraform_tfsec
2123
args:
2224
- --args=--exclude-downloaded-modules
2325
- id: checkov
2426
- repo: https://github.com/pre-commit/pre-commit-hooks
25-
rev: v4.1.0
27+
rev: v4.4.0
2628
hooks:
2729
# Git style
2830
- id: check-added-large-files

Diff for: README.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Terraform Modules Template
2-
3-
<!-- BEGIN_TF_DOCS -->
1+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
42
## Requirements
53

64
| Name | Version |
@@ -12,7 +10,7 @@
1210

1311
| Name | Version |
1412
|------|---------|
15-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.18.0 |
13+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.5.0 |
1614

1715
## Modules
1816

@@ -40,10 +38,10 @@ No modules.
4038
| <a name="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id) | Cluster ID | `string` | `null` | no |
4139
| <a name="input_cluster_mode_enabled"></a> [cluster\_mode\_enabled](#input\_cluster\_mode\_enabled) | Set to false to diable cluster module | `bool` | `false` | no |
4240
| <a name="input_cluster_size"></a> [cluster\_size](#input\_cluster\_size) | Cluster size | `number` | `1` | no |
43-
| <a name="input_create_elasticache_subnet_group"></a> [create\_elasticache\_subnet\_group](#input\_create\_elasticache\_subnet\_group) | Create Elasticache Subnet Group | `bool` | `false` | no |
44-
| <a name="input_elasticache_parameter_group_family"></a> [elasticache\_parameter\_group\_family](#input\_elasticache\_parameter\_group\_family) | ElastiCache parameter group family | `string` | `"memcached1.6"` | no |
41+
| <a name="input_create_elasticache_subnet_group"></a> [create\_elasticache\_subnet\_group](#input\_create\_elasticache\_subnet\_group) | Create Elasticache Subnet Group | `bool` | `true` | no |
42+
| <a name="input_elasticache_parameter_group_family"></a> [elasticache\_parameter\_group\_family](#input\_elasticache\_parameter\_group\_family) | ElastiCache parameter group family | `string` | `"redis7"` | no |
4543
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `true` | no |
46-
| <a name="input_engine_version"></a> [engine\_version](#input\_engine\_version) | Memcached engine version. For more info, see https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/supported-engine-versions.html | `string` | `"1.6.6"` | no |
44+
| <a name="input_engine_version"></a> [engine\_version](#input\_engine\_version) | Redis engine version. https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/supported-engine-versions.html | `string` | `"redis7.0"` | no |
4745
| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) | Elastic cache instance type | `string` | `"cache.t2.micro"` | no |
4846
| <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. If not supplied, uses service managed encryption. Can be specified only if `at_rest_encryption_enabled = true` | `string` | `null` | no |
4947
| <a name="input_maintenance_window"></a> [maintenance\_window](#input\_maintenance\_window) | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
@@ -80,4 +78,4 @@ No modules.
8078
| <a name="output_reader_endpoint_address"></a> [reader\_endpoint\_address](#output\_reader\_endpoint\_address) | The address of the endpoint for the reader node in the replication group, if the cluster mode is disabled |
8179
| <a name="output_subnet_group_name"></a> [subnet\_group\_name](#output\_subnet\_group\_name) | The Name of the ElastiCache Subnet Group. |
8280
| <a name="output_subnet_group_subnet_ids"></a> [subnet\_group\_subnet\_ids](#output\_subnet\_group\_subnet\_ids) | The Subnet IDs of the ElastiCache Subnet Group. |
83-
<!-- END_TF_DOCS -->
81+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Diff for: main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ resource "aws_elasticache_parameter_group" "this" {
3333
resource "aws_elasticache_subnet_group" "this" {
3434
count = var.enabled && var.create_elasticache_subnet_group ? 1 : 0
3535

36-
name = var.subnet_group_name
36+
name = format("%s-subnet-group", var.name)
3737
subnet_ids = var.subnets
3838
}
3939

Diff for: variables.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ variable "instance_type" {
5353
}
5454

5555
variable "engine_version" {
56-
description = "Memcached engine version. For more info, see https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/supported-engine-versions.html"
56+
description = "Redis engine version. https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/supported-engine-versions.html"
5757
type = string
58-
default = "1.6.6"
58+
default = "7.0"
5959
}
6060

6161
variable "alarm_cpu_threshold_percent" {
@@ -115,7 +115,7 @@ variable "subnet_group_name" {
115115
variable "elasticache_parameter_group_family" {
116116
description = "ElastiCache parameter group family"
117117
type = string
118-
default = "memcached1.6"
118+
default = "redis7"
119119
}
120120

121121
variable "replication_group_id" {
@@ -142,7 +142,7 @@ variable "cluster_id" {
142142
variable "create_elasticache_subnet_group" {
143143
description = "Create Elasticache Subnet Group"
144144
type = bool
145-
default = false
145+
default = true
146146
}
147147

148148
variable "preferred_cache_cluster_azs" {

0 commit comments

Comments
 (0)