From f5d021dd0e7c9ecef8f8cd5fd5899987221ceb57 Mon Sep 17 00:00:00 2001 From: Irmantas Marozas Date: Fri, 21 Apr 2023 11:24:43 +0300 Subject: [PATCH] Fix count for redis_egress sg rule --- .pre-commit-config.yaml | 2 +- README.md | 5 +++-- main.tf | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 889c23f..486bba1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,5 +21,5 @@ repos: rev: v1.74.0 hooks: - id: terraform_fmt - - id: terraform_docs + # - id: terraform_docs - id: terraform_tflint diff --git a/README.md b/README.md index c8ffd4d..4bcc218 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ No modules. | [cluster\_mode\_enabled](#input\_cluster\_mode\_enabled) | Enable creation of a native redis cluster. | `bool` | `false` | no | | [data\_tiering\_enabled](#input\_data\_tiering\_enabled) | Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes. | `bool` | `false` | no | | [description](#input\_description) | The description of the all resources. | `string` | `"Managed by Terraform"` | no | +| [egress\_cidr\_blocks](#input\_egress\_cidr\_blocks) | List of Egress CIDR blocks. | `list(string)` |
[
"0.0.0.0/0"
]
| no | | [engine\_version](#input\_engine\_version) | The 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 | | [final\_snapshot\_identifier](#input\_final\_snapshot\_identifier) | The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made. | `string` | `null` | no | @@ -131,7 +132,7 @@ No modules. | [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` | `""` | no | | [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | Log Delivery configuration for the cluster. |
list(object({
destination_type = string
destination = string
log_format = string
log_type = string
}))
| `[]` | no | | [maintenance\_window](#input\_maintenance\_window) | Specifies the weekly time range for when maintenance on the cache cluster is performed. | `string` | `""` | no | -| [multi\_az\_enabled](#input\_multi\_az\_enabled) | Specifies whether to enable Multi-AZ Support for the replication group. If true, `automatic_failover_enabled` must also be enabled. Defaults to false. | `string` | `false` | no | +| [multi\_az\_enabled](#input\_multi\_az\_enabled) | Specifies whether to enable Multi-AZ Support for the replication group. If true, `automatic_failover_enabled` must also be enabled. Defaults to false. | `bool` | `false` | no | | [name\_prefix](#input\_name\_prefix) | The replication group identifier. This parameter is stored as a lowercase string. | `string` | n/a | yes | | [node\_type](#input\_node\_type) | The compute and memory capacity of the nodes in the node group. | `string` | n/a | yes | | [notification\_topic\_arn](#input\_notification\_topic\_arn) | An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` | `string` | `""` | no | @@ -147,7 +148,7 @@ No modules. | [subnet\_ids](#input\_subnet\_ids) | List of VPC Subnet IDs for the cache subnet group. | `list(string)` | n/a | yes | | [tags](#input\_tags) | A mapping of tags to assign to all resources. | `map(string)` | `{}` | no | | [transit\_encryption\_enabled](#input\_transit\_encryption\_enabled) | Whether to enable encryption in transit. | `bool` | `true` | no | -| [user\_group\_id](#input\_user\_group\_id) | User Group ID to associate with the replication group. | `list(string)` | n/a | no | +| [user\_group\_ids](#input\_user\_group\_ids) | User Group ID to associate with the replication group | `list(string)` | `null` | no | | [vpc\_id](#input\_vpc\_id) | VPC Id to associate with Redis ElastiCache. | `string` | n/a | yes | ## Outputs diff --git a/main.tf b/main.tf index 9d3b4b2..daff78d 100644 --- a/main.tf +++ b/main.tf @@ -139,7 +139,7 @@ resource "aws_security_group_rule" "redis_egress" { from_port = 0 to_port = 0 protocol = "-1" - cidr_blocks = var.egress_cidr_blocks + cidr_blocks = var.egress_cidr_blocks[count.index] security_group_id = aws_security_group.redis.id }