Skip to content

Conversation

leoalves100
Copy link
Contributor

Description

Add to_port in zabbix rules

Motivation and Context

Error trying to apply zabbix rule

Error: Incorrect attribute value type

  on .terraform/modules/security_group/main.tf line 217, in resource "aws_security_group_rule" "ingress_with_cidr_blocks":
 217:   to_port = lookup(
 218:     var.ingress_with_cidr_blocks[count.index],
 219:     "to_port",
 220:     var.rules[lookup(var.ingress_with_cidr_blocks[count.index], "rule", "_")][1],
 221:   )
    |----------------
    | count.index is 0
    | var.ingress_with_cidr_blocks is list of map of string with 2 elements
    | var.rules is map of list of string with 148 elements

Inappropriate value for attribute "to_port": a number is required.

Breaking Changes

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@antonbabenko antonbabenko changed the title fix: Added to_port in rules fix: Fixed zabbix rules Sep 26, 2022
@antonbabenko antonbabenko merged commit be7d46d into terraform-aws-modules:master Sep 26, 2022
@antonbabenko
Copy link
Member

@leoalves100 Thanks a lot for this fix!

antonbabenko pushed a commit that referenced this pull request Sep 26, 2022
### [4.13.1](v4.13.0...v4.13.1) (2022-09-26)

### Bug Fixes

* Fixed zabbix rules ([#261](#261)) ([be7d46d](be7d46d))
@antonbabenko
Copy link
Member

This PR is included in version 4.13.1 🎉

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants