terraform-aws-elasticache-redis icon indicating copy to clipboard operation
terraform-aws-elasticache-redis copied to clipboard

Fix count for redis_egress sg rule

Open IrmantasMarozas opened this issue 2 years ago • 1 comments

Description

Fix count for redis_egress sg rule

I'm not sure why, but pre-commit hook for docs didn't work for me, so I commented it out.

Terraform docs...........................................................Failed

  • hook id: terraform_docs
  • exit code: 1
  • files were modified by this hook

IrmantasMarozas avatar Apr 21 '23 08:04 IrmantasMarozas

Has this been validated using one of the examples?

I tried running this change against one of the examples and I got

❯ terraform validate
╷
│ Error: Incorrect attribute value type
│
│   on ../../main.tf line 142, in resource "aws_security_group_rule" "redis_egress":
│  142:   cidr_blocks       = var.egress_cidr_blocks[count.index]
│     ├────────────────
│     │ count.index is a number
│     │ var.egress_cidr_blocks is a list of string
│
│ Inappropriate value for attribute "cidr_blocks": list of string required.

Second, I'm not totally sure what the issue is here in the first place. What is this solution trying to solve?

Ohid25 avatar Aug 15 '23 13:08 Ohid25