1. Packages
  2. Vkcs Provider
  3. API Docs
  4. NetworkingSecgroupRule
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.NetworkingSecgroupRule

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Manages a security group rule resource within VKCS.

    Example Usage

    Basic-rule one protocol one port

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const etcdAppClients = new vkcs.NetworkingSecgroupRule("etcdAppClients", {
        description: "etcd app clients rule",
        securityGroupId: vkcs_networking_secgroup.etcd.id,
        direction: "ingress",
        protocol: "tcp",
        portRangeMax: 2379,
        portRangeMin: 2379,
        remoteIpPrefix: vkcs_networking_subnet.app.cidr,
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    etcd_app_clients = vkcs.NetworkingSecgroupRule("etcdAppClients",
        description="etcd app clients rule",
        security_group_id=vkcs_networking_secgroup["etcd"]["id"],
        direction="ingress",
        protocol="tcp",
        port_range_max=2379,
        port_range_min=2379,
        remote_ip_prefix=vkcs_networking_subnet["app"]["cidr"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewNetworkingSecgroupRule(ctx, "etcdAppClients", &vkcs.NetworkingSecgroupRuleArgs{
    			Description:     pulumi.String("etcd app clients rule"),
    			SecurityGroupId: pulumi.Any(vkcs_networking_secgroup.Etcd.Id),
    			Direction:       pulumi.String("ingress"),
    			Protocol:        pulumi.String("tcp"),
    			PortRangeMax:    pulumi.Float64(2379),
    			PortRangeMin:    pulumi.Float64(2379),
    			RemoteIpPrefix:  pulumi.Any(vkcs_networking_subnet.App.Cidr),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var etcdAppClients = new Vkcs.NetworkingSecgroupRule("etcdAppClients", new()
        {
            Description = "etcd app clients rule",
            SecurityGroupId = vkcs_networking_secgroup.Etcd.Id,
            Direction = "ingress",
            Protocol = "tcp",
            PortRangeMax = 2379,
            PortRangeMin = 2379,
            RemoteIpPrefix = vkcs_networking_subnet.App.Cidr,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.NetworkingSecgroupRule;
    import com.pulumi.vkcs.NetworkingSecgroupRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var etcdAppClients = new NetworkingSecgroupRule("etcdAppClients", NetworkingSecgroupRuleArgs.builder()
                .description("etcd app clients rule")
                .securityGroupId(vkcs_networking_secgroup.etcd().id())
                .direction("ingress")
                .protocol("tcp")
                .portRangeMax(2379)
                .portRangeMin(2379)
                .remoteIpPrefix(vkcs_networking_subnet.app().cidr())
                .build());
    
        }
    }
    
    resources:
      etcdAppClients:
        type: vkcs:NetworkingSecgroupRule
        properties:
          description: etcd app clients rule
          securityGroupId: ${vkcs_networking_secgroup.etcd.id}
          direction: ingress
          protocol: tcp
          portRangeMax: 2379
          portRangeMin: 2379
          remoteIpPrefix: ${vkcs_networking_subnet.app.cidr}
    

    Rule for all ports for particular protocol (udp)

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const allUdp = new vkcs.NetworkingSecgroupRule("allUdp", {
        description: "All inbound UDP traffic from etcd hosts",
        securityGroupId: vkcs_networking_secgroup.etcd.id,
        direction: "ingress",
        protocol: "udp",
        remoteGroupId: vkcs_networking_secgroup.etcd.id,
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    all_udp = vkcs.NetworkingSecgroupRule("allUdp",
        description="All inbound UDP traffic from etcd hosts",
        security_group_id=vkcs_networking_secgroup["etcd"]["id"],
        direction="ingress",
        protocol="udp",
        remote_group_id=vkcs_networking_secgroup["etcd"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewNetworkingSecgroupRule(ctx, "allUdp", &vkcs.NetworkingSecgroupRuleArgs{
    			Description:     pulumi.String("All inbound UDP traffic from etcd hosts"),
    			SecurityGroupId: pulumi.Any(vkcs_networking_secgroup.Etcd.Id),
    			Direction:       pulumi.String("ingress"),
    			Protocol:        pulumi.String("udp"),
    			RemoteGroupId:   pulumi.Any(vkcs_networking_secgroup.Etcd.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var allUdp = new Vkcs.NetworkingSecgroupRule("allUdp", new()
        {
            Description = "All inbound UDP traffic from etcd hosts",
            SecurityGroupId = vkcs_networking_secgroup.Etcd.Id,
            Direction = "ingress",
            Protocol = "udp",
            RemoteGroupId = vkcs_networking_secgroup.Etcd.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.NetworkingSecgroupRule;
    import com.pulumi.vkcs.NetworkingSecgroupRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var allUdp = new NetworkingSecgroupRule("allUdp", NetworkingSecgroupRuleArgs.builder()
                .description("All inbound UDP traffic from etcd hosts")
                .securityGroupId(vkcs_networking_secgroup.etcd().id())
                .direction("ingress")
                .protocol("udp")
                .remoteGroupId(vkcs_networking_secgroup.etcd().id())
                .build());
    
        }
    }
    
    resources:
      allUdp:
        type: vkcs:NetworkingSecgroupRule
        properties:
          description: All inbound UDP traffic from etcd hosts
          securityGroupId: ${vkcs_networking_secgroup.etcd.id}
          direction: ingress
          protocol: udp
          remoteGroupId: ${vkcs_networking_secgroup.etcd.id}
    

    Rule for all protocols

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const all = new vkcs.NetworkingSecgroupRule("all", {
        description: "Any inbound traffic from etcd hosts",
        securityGroupId: vkcs_networking_secgroup.etcd.id,
        direction: "ingress",
        remoteGroupId: vkcs_networking_secgroup.etcd.id,
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    all = vkcs.NetworkingSecgroupRule("all",
        description="Any inbound traffic from etcd hosts",
        security_group_id=vkcs_networking_secgroup["etcd"]["id"],
        direction="ingress",
        remote_group_id=vkcs_networking_secgroup["etcd"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewNetworkingSecgroupRule(ctx, "all", &vkcs.NetworkingSecgroupRuleArgs{
    			Description:     pulumi.String("Any inbound traffic from etcd hosts"),
    			SecurityGroupId: pulumi.Any(vkcs_networking_secgroup.Etcd.Id),
    			Direction:       pulumi.String("ingress"),
    			RemoteGroupId:   pulumi.Any(vkcs_networking_secgroup.Etcd.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var all = new Vkcs.NetworkingSecgroupRule("all", new()
        {
            Description = "Any inbound traffic from etcd hosts",
            SecurityGroupId = vkcs_networking_secgroup.Etcd.Id,
            Direction = "ingress",
            RemoteGroupId = vkcs_networking_secgroup.Etcd.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.NetworkingSecgroupRule;
    import com.pulumi.vkcs.NetworkingSecgroupRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var all = new NetworkingSecgroupRule("all", NetworkingSecgroupRuleArgs.builder()
                .description("Any inbound traffic from etcd hosts")
                .securityGroupId(vkcs_networking_secgroup.etcd().id())
                .direction("ingress")
                .remoteGroupId(vkcs_networking_secgroup.etcd().id())
                .build());
    
        }
    }
    
    resources:
      all:
        type: vkcs:NetworkingSecgroupRule
        properties:
          description: Any inbound traffic from etcd hosts
          securityGroupId: ${vkcs_networking_secgroup.etcd.id}
          direction: ingress
          remoteGroupId: ${vkcs_networking_secgroup.etcd.id}
    

    Create NetworkingSecgroupRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NetworkingSecgroupRule(name: string, args: NetworkingSecgroupRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkingSecgroupRule(resource_name: str,
                               args: NetworkingSecgroupRuleArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkingSecgroupRule(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               security_group_id: Optional[str] = None,
                               direction: Optional[str] = None,
                               protocol: Optional[str] = None,
                               networking_secgroup_rule_id: Optional[str] = None,
                               port_range_max: Optional[float] = None,
                               port_range_min: Optional[float] = None,
                               description: Optional[str] = None,
                               region: Optional[str] = None,
                               remote_group_id: Optional[str] = None,
                               remote_ip_prefix: Optional[str] = None,
                               sdn: Optional[str] = None,
                               ethertype: Optional[str] = None,
                               timeouts: Optional[NetworkingSecgroupRuleTimeoutsArgs] = None)
    func NewNetworkingSecgroupRule(ctx *Context, name string, args NetworkingSecgroupRuleArgs, opts ...ResourceOption) (*NetworkingSecgroupRule, error)
    public NetworkingSecgroupRule(string name, NetworkingSecgroupRuleArgs args, CustomResourceOptions? opts = null)
    public NetworkingSecgroupRule(String name, NetworkingSecgroupRuleArgs args)
    public NetworkingSecgroupRule(String name, NetworkingSecgroupRuleArgs args, CustomResourceOptions options)
    
    type: vkcs:NetworkingSecgroupRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NetworkingSecgroupRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkingSecgroupRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkingSecgroupRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkingSecgroupRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkingSecgroupRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var networkingSecgroupRuleResource = new Vkcs.NetworkingSecgroupRule("networkingSecgroupRuleResource", new()
    {
        SecurityGroupId = "string",
        Direction = "string",
        Protocol = "string",
        NetworkingSecgroupRuleId = "string",
        PortRangeMax = 0,
        PortRangeMin = 0,
        Description = "string",
        Region = "string",
        RemoteGroupId = "string",
        RemoteIpPrefix = "string",
        Sdn = "string",
        Timeouts = new Vkcs.Inputs.NetworkingSecgroupRuleTimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := vkcs.NewNetworkingSecgroupRule(ctx, "networkingSecgroupRuleResource", &vkcs.NetworkingSecgroupRuleArgs{
    SecurityGroupId: pulumi.String("string"),
    Direction: pulumi.String("string"),
    Protocol: pulumi.String("string"),
    NetworkingSecgroupRuleId: pulumi.String("string"),
    PortRangeMax: pulumi.Float64(0),
    PortRangeMin: pulumi.Float64(0),
    Description: pulumi.String("string"),
    Region: pulumi.String("string"),
    RemoteGroupId: pulumi.String("string"),
    RemoteIpPrefix: pulumi.String("string"),
    Sdn: pulumi.String("string"),
    Timeouts: &.NetworkingSecgroupRuleTimeoutsArgs{
    Delete: pulumi.String("string"),
    },
    })
    
    var networkingSecgroupRuleResource = new NetworkingSecgroupRule("networkingSecgroupRuleResource", NetworkingSecgroupRuleArgs.builder()
        .securityGroupId("string")
        .direction("string")
        .protocol("string")
        .networkingSecgroupRuleId("string")
        .portRangeMax(0)
        .portRangeMin(0)
        .description("string")
        .region("string")
        .remoteGroupId("string")
        .remoteIpPrefix("string")
        .sdn("string")
        .timeouts(NetworkingSecgroupRuleTimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    networking_secgroup_rule_resource = vkcs.NetworkingSecgroupRule("networkingSecgroupRuleResource",
        security_group_id="string",
        direction="string",
        protocol="string",
        networking_secgroup_rule_id="string",
        port_range_max=0,
        port_range_min=0,
        description="string",
        region="string",
        remote_group_id="string",
        remote_ip_prefix="string",
        sdn="string",
        timeouts={
            "delete": "string",
        })
    
    const networkingSecgroupRuleResource = new vkcs.NetworkingSecgroupRule("networkingSecgroupRuleResource", {
        securityGroupId: "string",
        direction: "string",
        protocol: "string",
        networkingSecgroupRuleId: "string",
        portRangeMax: 0,
        portRangeMin: 0,
        description: "string",
        region: "string",
        remoteGroupId: "string",
        remoteIpPrefix: "string",
        sdn: "string",
        timeouts: {
            "delete": "string",
        },
    });
    
    type: vkcs:NetworkingSecgroupRule
    properties:
        description: string
        direction: string
        networkingSecgroupRuleId: string
        portRangeMax: 0
        portRangeMin: 0
        protocol: string
        region: string
        remoteGroupId: string
        remoteIpPrefix: string
        sdn: string
        securityGroupId: string
        timeouts:
            delete: string
    

    NetworkingSecgroupRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NetworkingSecgroupRule resource accepts the following input properties:

    Direction string
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    SecurityGroupId string
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    Description string
    optional string → A description of the rule. Changing this creates a new security group rule.
    Ethertype string
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    NetworkingSecgroupRuleId string
    string → ID of the resource.
    PortRangeMax double
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    PortRangeMin double
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    Protocol string
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    Region string
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    RemoteGroupId string
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    RemoteIpPrefix string
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    Timeouts NetworkingSecgroupRuleTimeouts
    Direction string
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    SecurityGroupId string
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    Description string
    optional string → A description of the rule. Changing this creates a new security group rule.
    Ethertype string
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    NetworkingSecgroupRuleId string
    string → ID of the resource.
    PortRangeMax float64
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    PortRangeMin float64
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    Protocol string
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    Region string
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    RemoteGroupId string
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    RemoteIpPrefix string
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    Timeouts NetworkingSecgroupRuleTimeoutsArgs
    direction String
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    securityGroupId String
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    description String
    optional string → A description of the rule. Changing this creates a new security group rule.
    ethertype String
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    networkingSecgroupRuleId String
    string → ID of the resource.
    portRangeMax Double
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    portRangeMin Double
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    protocol String
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region String
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId String
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    remoteIpPrefix String
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    timeouts NetworkingSecgroupRuleTimeouts
    direction string
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    securityGroupId string
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    description string
    optional string → A description of the rule. Changing this creates a new security group rule.
    ethertype string
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    networkingSecgroupRuleId string
    string → ID of the resource.
    portRangeMax number
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    portRangeMin number
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    protocol string
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region string
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId string
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    remoteIpPrefix string
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    timeouts NetworkingSecgroupRuleTimeouts
    direction str
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    security_group_id str
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    description str
    optional string → A description of the rule. Changing this creates a new security group rule.
    ethertype str
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    networking_secgroup_rule_id str
    string → ID of the resource.
    port_range_max float
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    port_range_min float
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    protocol str
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region str
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remote_group_id str
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    remote_ip_prefix str
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    sdn str
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    timeouts NetworkingSecgroupRuleTimeoutsArgs
    direction String
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    securityGroupId String
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    description String
    optional string → A description of the rule. Changing this creates a new security group rule.
    ethertype String
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    networkingSecgroupRuleId String
    string → ID of the resource.
    portRangeMax Number
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    portRangeMin Number
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    protocol String
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region String
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId String
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    remoteIpPrefix String
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkingSecgroupRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NetworkingSecgroupRule Resource

    Get an existing NetworkingSecgroupRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NetworkingSecgroupRuleState, opts?: CustomResourceOptions): NetworkingSecgroupRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            direction: Optional[str] = None,
            ethertype: Optional[str] = None,
            networking_secgroup_rule_id: Optional[str] = None,
            port_range_max: Optional[float] = None,
            port_range_min: Optional[float] = None,
            protocol: Optional[str] = None,
            region: Optional[str] = None,
            remote_group_id: Optional[str] = None,
            remote_ip_prefix: Optional[str] = None,
            sdn: Optional[str] = None,
            security_group_id: Optional[str] = None,
            timeouts: Optional[NetworkingSecgroupRuleTimeoutsArgs] = None) -> NetworkingSecgroupRule
    func GetNetworkingSecgroupRule(ctx *Context, name string, id IDInput, state *NetworkingSecgroupRuleState, opts ...ResourceOption) (*NetworkingSecgroupRule, error)
    public static NetworkingSecgroupRule Get(string name, Input<string> id, NetworkingSecgroupRuleState? state, CustomResourceOptions? opts = null)
    public static NetworkingSecgroupRule get(String name, Output<String> id, NetworkingSecgroupRuleState state, CustomResourceOptions options)
    resources:  _:    type: vkcs:NetworkingSecgroupRule    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    optional string → A description of the rule. Changing this creates a new security group rule.
    Direction string
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    Ethertype string
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    NetworkingSecgroupRuleId string
    string → ID of the resource.
    PortRangeMax double
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    PortRangeMin double
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    Protocol string
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    Region string
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    RemoteGroupId string
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    RemoteIpPrefix string
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    SecurityGroupId string
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    Timeouts NetworkingSecgroupRuleTimeouts
    Description string
    optional string → A description of the rule. Changing this creates a new security group rule.
    Direction string
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    Ethertype string
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    NetworkingSecgroupRuleId string
    string → ID of the resource.
    PortRangeMax float64
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    PortRangeMin float64
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    Protocol string
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    Region string
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    RemoteGroupId string
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    RemoteIpPrefix string
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    SecurityGroupId string
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    Timeouts NetworkingSecgroupRuleTimeoutsArgs
    description String
    optional string → A description of the rule. Changing this creates a new security group rule.
    direction String
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype String
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    networkingSecgroupRuleId String
    string → ID of the resource.
    portRangeMax Double
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    portRangeMin Double
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    protocol String
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region String
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId String
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    remoteIpPrefix String
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    securityGroupId String
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    timeouts NetworkingSecgroupRuleTimeouts
    description string
    optional string → A description of the rule. Changing this creates a new security group rule.
    direction string
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype string
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    networkingSecgroupRuleId string
    string → ID of the resource.
    portRangeMax number
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    portRangeMin number
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    protocol string
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region string
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId string
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    remoteIpPrefix string
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    securityGroupId string
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    timeouts NetworkingSecgroupRuleTimeouts
    description str
    optional string → A description of the rule. Changing this creates a new security group rule.
    direction str
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype str
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    networking_secgroup_rule_id str
    string → ID of the resource.
    port_range_max float
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    port_range_min float
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    protocol str
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region str
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remote_group_id str
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    remote_ip_prefix str
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    sdn str
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    security_group_id str
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    timeouts NetworkingSecgroupRuleTimeoutsArgs
    description String
    optional string → A description of the rule. Changing this creates a new security group rule.
    direction String
    required string → The direction of the rule, valid values are ingress or egress. Changing this creates a new security group rule.
    ethertype String
    optional deprecated string → The layer 3 protocol type, the only valid value is IPv4. Changing this creates a new security group rule. Deprecated Only IPv4 can be used as ethertype. This argument is deprecated, please do not use it.

    Deprecated: Deprecated

    networkingSecgroupRuleId String
    string → ID of the resource.
    portRangeMax Number
    optional number → The higher part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    portRangeMin Number
    optional number → The lower part of the allowed port range, valid integer value needs to be between 1 and 65535. To specify all ports, port_range_min and port_range_max arguments must be absent. Changing this creates a new security group rule.
    protocol String
    optional string → The layer 4 protocol type, valid values are following. Changing this creates a new security group rule. This is required if you want to specify a port range.

    • tcp
    • udp
    • icmp
    • ah
    • dccp
    • egp
    • esp
    • gre
    • igmp
    • ospf
    • pgm
    • rsvp
    • sctp
    • udplite
    • vrrp
    region String
    optional string → The region in which to obtain the networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group rule.
    remoteGroupId String
    optional string → The remote group id, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    remoteIpPrefix String
    optional string → The remote CIDR, the value needs to be a valid CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule. Note: Only one of remote_group_id or remote_ip_prefix may be set.
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    securityGroupId String
    required string → The security group id the rule should belong to, the value needs to be an ID of a security group in the same tenant. Changing this creates a new security group rule.
    timeouts Property Map

    Supporting Types

    NetworkingSecgroupRuleTimeouts, NetworkingSecgroupRuleTimeoutsArgs

    Delete string
    Delete string
    delete String
    delete string
    delete str
    delete String

    Import

    Security Group Rules can be imported using the id, e.g.

    $ pulumi import vkcs:index/networkingSecgroupRule:NetworkingSecgroupRule secgroup_rule_1 aeb68ee3-6e9d-4256-955c-9584a6212745
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs