This resource can be useful for getting back a set of security group rule IDs.
data "aws_vpc_security_group_rules" "example" {
filter {
name = "group-id"
values = [var.security_group_id]
}
}
filter
- (Optional) Custom filter block as described below.tags
- (Optional) Map of tags, each pair of which must exactly match
a pair on the desired security group rule.More complex filters can be expressed using one or more filter
sub-blocks,
which take the following arguments:
name
- (Required) Name of the field to filter by, as defined by
the underlying AWS API.values
- (Required) Set of values that are accepted for the given field.
Security group rule IDs will be selected if any one of the given values match.This data source exports the following attributes in addition to the arguments above:
ids
- List of all the security group rule IDs found.