1. Packages
  2. stackit
  3. API Docs
  4. getSecurityGroupRule
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud

    Security group datasource schema. Must have a region specified in the provider configuration.

    Example Usage

    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"
    }
    

    Using getSecurityGroupRule

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSecurityGroupRule(args: GetSecurityGroupRuleArgs, opts?: InvokeOptions): Promise<GetSecurityGroupRuleResult>
    function getSecurityGroupRuleOutput(args: GetSecurityGroupRuleOutputArgs, opts?: InvokeOptions): Output<GetSecurityGroupRuleResult>
    def get_security_group_rule(project_id: Optional[str] = None,
                                region: Optional[str] = None,
                                security_group_id: Optional[str] = None,
                                security_group_rule_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetSecurityGroupRuleResult
    def get_security_group_rule_output(project_id: Optional[pulumi.Input[str]] = None,
                                region: Optional[pulumi.Input[str]] = None,
                                security_group_id: Optional[pulumi.Input[str]] = None,
                                security_group_rule_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetSecurityGroupRuleResult]
    func LookupSecurityGroupRule(ctx *Context, args *LookupSecurityGroupRuleArgs, opts ...InvokeOption) (*LookupSecurityGroupRuleResult, error)
    func LookupSecurityGroupRuleOutput(ctx *Context, args *LookupSecurityGroupRuleOutputArgs, opts ...InvokeOption) LookupSecurityGroupRuleResultOutput

    > Note: This function is named LookupSecurityGroupRule in the Go SDK.

    public static class GetSecurityGroupRule 
    {
        public static Task<GetSecurityGroupRuleResult> InvokeAsync(GetSecurityGroupRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetSecurityGroupRuleResult> Invoke(GetSecurityGroupRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecurityGroupRuleResult> getSecurityGroupRule(GetSecurityGroupRuleArgs args, InvokeOptions options)
    public static Output<GetSecurityGroupRuleResult> getSecurityGroupRule(GetSecurityGroupRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: stackit:index/getSecurityGroupRule:getSecurityGroupRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId string
    STACKIT project ID to which the security group rule is associated.
    SecurityGroupId string
    The security group ID.
    SecurityGroupRuleId string
    The security group rule ID.
    Region string
    The resource region. If not defined, the provider region is used.
    ProjectId string
    STACKIT project ID to which the security group rule is associated.
    SecurityGroupId string
    The security group ID.
    SecurityGroupRuleId string
    The security group rule ID.
    Region string
    The resource region. If not defined, the provider region is used.
    projectId String
    STACKIT project ID to which the security group rule is associated.
    securityGroupId String
    The security group ID.
    securityGroupRuleId String
    The security group rule ID.
    region String
    The resource region. If not defined, the provider region is used.
    projectId string
    STACKIT project ID to which the security group rule is associated.
    securityGroupId string
    The security group ID.
    securityGroupRuleId string
    The security group rule ID.
    region string
    The resource region. If not defined, the provider region is used.
    project_id str
    STACKIT project ID to which the security group rule is associated.
    security_group_id str
    The security group ID.
    security_group_rule_id str
    The security group rule ID.
    region str
    The resource region. If not defined, the provider region is used.
    projectId String
    STACKIT project ID to which the security group rule is associated.
    securityGroupId String
    The security group ID.
    securityGroupRuleId String
    The security group rule ID.
    region String
    The resource region. If not defined, the provider region is used.

    getSecurityGroupRule Result

    The following output properties are available:

    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: Possible values are: ingress, egress.
    EtherType string
    The ethertype which the rule should match.
    IcmpParameters GetSecurityGroupRuleIcmpParameters
    ICMP Parameters.
    Id string
    IpRange string
    The remote IP range which the rule should match.
    PortRange GetSecurityGroupRulePortRange
    The range of ports.
    ProjectId string
    STACKIT project ID to which the security group rule is associated.
    Protocol GetSecurityGroupRuleProtocol
    The internet protocol which the rule should match.
    RemoteSecurityGroupId string
    The remote security group which the rule should match.
    SecurityGroupId string
    The security group ID.
    SecurityGroupRuleId string
    The security group rule ID.
    Region string
    The resource region. If not defined, the provider region is used.
    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: Possible values are: ingress, egress.
    EtherType string
    The ethertype which the rule should match.
    IcmpParameters GetSecurityGroupRuleIcmpParameters
    ICMP Parameters.
    Id string
    IpRange string
    The remote IP range which the rule should match.
    PortRange GetSecurityGroupRulePortRange
    The range of ports.
    ProjectId string
    STACKIT project ID to which the security group rule is associated.
    Protocol GetSecurityGroupRuleProtocol
    The internet protocol which the rule should match.
    RemoteSecurityGroupId string
    The remote security group which the rule should match.
    SecurityGroupId string
    The security group ID.
    SecurityGroupRuleId string
    The security group rule ID.
    Region string
    The resource region. If not defined, the provider region is used.
    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: Possible values are: ingress, egress.
    etherType String
    The ethertype which the rule should match.
    icmpParameters GetSecurityGroupRuleIcmpParameters
    ICMP Parameters.
    id String
    ipRange String
    The remote IP range which the rule should match.
    portRange GetSecurityGroupRulePortRange
    The range of ports.
    projectId String
    STACKIT project ID to which the security group rule is associated.
    protocol GetSecurityGroupRuleProtocol
    The internet protocol which the rule should match.
    remoteSecurityGroupId String
    The remote security group which the rule should match.
    securityGroupId String
    The security group ID.
    securityGroupRuleId String
    The security group rule ID.
    region String
    The resource region. If not defined, the provider region is used.
    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: Possible values are: ingress, egress.
    etherType string
    The ethertype which the rule should match.
    icmpParameters GetSecurityGroupRuleIcmpParameters
    ICMP Parameters.
    id string
    ipRange string
    The remote IP range which the rule should match.
    portRange GetSecurityGroupRulePortRange
    The range of ports.
    projectId string
    STACKIT project ID to which the security group rule is associated.
    protocol GetSecurityGroupRuleProtocol
    The internet protocol which the rule should match.
    remoteSecurityGroupId string
    The remote security group which the rule should match.
    securityGroupId string
    The security group ID.
    securityGroupRuleId string
    The security group rule ID.
    region string
    The resource region. If not defined, the provider region is used.
    description str
    The description of the security group rule.
    direction str
    The direction of the traffic which the rule should match. Some of the possible values are: Possible values are: ingress, egress.
    ether_type str
    The ethertype which the rule should match.
    icmp_parameters GetSecurityGroupRuleIcmpParameters
    ICMP Parameters.
    id str
    ip_range str
    The remote IP range which the rule should match.
    port_range GetSecurityGroupRulePortRange
    The range of ports.
    project_id str
    STACKIT project ID to which the security group rule is associated.
    protocol GetSecurityGroupRuleProtocol
    The internet protocol which the rule should match.
    remote_security_group_id str
    The remote security group which the rule should match.
    security_group_id str
    The security group ID.
    security_group_rule_id str
    The security group rule ID.
    region str
    The resource region. If not defined, the provider region is used.
    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: Possible values are: ingress, egress.
    etherType String
    The ethertype which the rule should match.
    icmpParameters Property Map
    ICMP Parameters.
    id String
    ipRange String
    The remote IP range which the rule should match.
    portRange Property Map
    The range of ports.
    projectId String
    STACKIT project ID to which the security group rule is associated.
    protocol Property Map
    The internet protocol which the rule should match.
    remoteSecurityGroupId String
    The remote security group which the rule should match.
    securityGroupId String
    The security group ID.
    securityGroupRuleId String
    The security group rule ID.
    region String
    The resource region. If not defined, the provider region is used.

    Supporting Types

    GetSecurityGroupRuleIcmpParameters

    Code int
    ICMP code. Can be set if the protocol is ICMP.
    Type int
    ICMP type. Can be set if the protocol is ICMP.
    Code int
    ICMP code. Can be set if the protocol is ICMP.
    Type int
    ICMP type. Can be set if the protocol is ICMP.
    code Integer
    ICMP code. Can be set if the protocol is ICMP.
    type Integer
    ICMP type. Can be set if the protocol is ICMP.
    code number
    ICMP code. Can be set if the protocol is ICMP.
    type number
    ICMP type. Can be set if the protocol is ICMP.
    code int
    ICMP code. Can be set if the protocol is ICMP.
    type int
    ICMP type. Can be set if the protocol is ICMP.
    code Number
    ICMP code. Can be set if the protocol is ICMP.
    type Number
    ICMP type. Can be set if the protocol is ICMP.

    GetSecurityGroupRulePortRange

    Max int
    The maximum port number. Should be greater or equal to the minimum.
    Min int
    The minimum port number. Should be less or equal to the minimum.
    Max int
    The maximum port number. Should be greater or equal to the minimum.
    Min int
    The minimum port number. Should be less or equal to the minimum.
    max Integer
    The maximum port number. Should be greater or equal to the minimum.
    min Integer
    The minimum port number. Should be less or equal to the minimum.
    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.
    max int
    The maximum port number. Should be greater or equal to the minimum.
    min int
    The minimum port number. Should be less or equal to the minimum.
    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.

    GetSecurityGroupRuleProtocol

    Name string
    The protocol name which the rule should match.
    Number int
    The protocol number which the rule should match.
    Name string
    The protocol name which the rule should match.
    Number int
    The protocol number which the rule should match.
    name String
    The protocol name which the rule should match.
    number Integer
    The protocol number which the rule should match.
    name string
    The protocol name which the rule should match.
    number number
    The protocol number which the rule should match.
    name str
    The protocol name which the rule should match.
    number int
    The protocol number which the rule should match.
    name String
    The protocol name which the rule should match.
    number Number
    The protocol number which the rule should match.

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.4
    published on Friday, Feb 20, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.