---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_security_group_rule Data Source - stackit"
subcategory: ""
description: |-
Security group datasource schema. Must have a region specified in the provider configuration.
---
# stackit_security_group_rule (Data Source)
Security group datasource schema. Must have a `region` specified in the provider configuration.
## Example Usage
```terraform
data "stackit_security_group_rule" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
security_group_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
security_group_rule_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
## Schema
### Required
- `project_id` (String) STACKIT project ID to which the security group rule is associated.
- `security_group_id` (String) The security group ID.
- `security_group_rule_id` (String) The security group rule ID.
### Read-Only
- `description` (String) The description of the security group rule.
- `direction` (String) The direction of the traffic which the rule should match. Some of the possible values are: Supported values are: `ingress`, `egress`.
- `ether_type` (String) The ethertype which the rule should match.
- `icmp_parameters` (Attributes) ICMP Parameters. (see [below for nested schema](#nestedatt--icmp_parameters))
- `id` (String) Terraform's internal datasource ID. It is structured as "`project_id`,`security_group_id`,`security_group_rule_id`".
- `ip_range` (String) The remote IP range which the rule should match.
- `port_range` (Attributes) The range of ports. (see [below for nested schema](#nestedatt--port_range))
- `protocol` (Attributes) The internet protocol which the rule should match. (see [below for nested schema](#nestedatt--protocol))
- `remote_security_group_id` (String) The remote security group which the rule should match.
### Nested Schema for `icmp_parameters`
Read-Only:
- `code` (Number) ICMP code. Can be set if the protocol is ICMP.
- `type` (Number) ICMP type. Can be set if the protocol is ICMP.
### Nested Schema for `port_range`
Read-Only:
- `max` (Number) The maximum port number. Should be greater or equal to the minimum.
- `min` (Number) The minimum port number. Should be less or equal to the minimum.
### Nested Schema for `protocol`
Read-Only:
- `name` (String) The protocol name which the rule should match.
- `number` (Number) The protocol number which the rule should match.