1. Packages
  2. Ibm Provider
  3. API Docs
  4. PiNetworkSecurityGroup
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.PiNetworkSecurityGroup

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, and delete a network security group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const networkSecurityGroup = new ibm.PiNetworkSecurityGroup("networkSecurityGroup", {
        piCloudInstanceId: "<value of the cloud_instance_id>",
        piName: "name",
        piUserTags: [
            "tag1",
            "tag2",
        ],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    network_security_group = ibm.PiNetworkSecurityGroup("networkSecurityGroup",
        pi_cloud_instance_id="<value of the cloud_instance_id>",
        pi_name="name",
        pi_user_tags=[
            "tag1",
            "tag2",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewPiNetworkSecurityGroup(ctx, "networkSecurityGroup", &ibm.PiNetworkSecurityGroupArgs{
    			PiCloudInstanceId: pulumi.String("<value of the cloud_instance_id>"),
    			PiName:            pulumi.String("name"),
    			PiUserTags: pulumi.StringArray{
    				pulumi.String("tag1"),
    				pulumi.String("tag2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var networkSecurityGroup = new Ibm.PiNetworkSecurityGroup("networkSecurityGroup", new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
            PiName = "name",
            PiUserTags = new[]
            {
                "tag1",
                "tag2",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.PiNetworkSecurityGroup;
    import com.pulumi.ibm.PiNetworkSecurityGroupArgs;
    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 networkSecurityGroup = new PiNetworkSecurityGroup("networkSecurityGroup", PiNetworkSecurityGroupArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .piName("name")
                .piUserTags(            
                    "tag1",
                    "tag2")
                .build());
    
        }
    }
    
    resources:
      networkSecurityGroup:
        type: ibm:PiNetworkSecurityGroup
        properties:
          piCloudInstanceId: <value of the cloud_instance_id>
          piName: name
          piUserTags:
            - tag1
            - tag2
    

    Example

    terraform import ibm_pi_network_security_group.example d7bec597-4726-451f-8a63-e62e6f19c32c/cea6651a-bc0a-4438-9f8a-a0770bbf3ebb
    

    Create PiNetworkSecurityGroup Resource

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

    Constructor syntax

    new PiNetworkSecurityGroup(name: string, args: PiNetworkSecurityGroupArgs, opts?: CustomResourceOptions);
    @overload
    def PiNetworkSecurityGroup(resource_name: str,
                               args: PiNetworkSecurityGroupArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def PiNetworkSecurityGroup(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               pi_cloud_instance_id: Optional[str] = None,
                               pi_name: Optional[str] = None,
                               pi_network_security_group_id: Optional[str] = None,
                               pi_user_tags: Optional[Sequence[str]] = None,
                               timeouts: Optional[PiNetworkSecurityGroupTimeoutsArgs] = None)
    func NewPiNetworkSecurityGroup(ctx *Context, name string, args PiNetworkSecurityGroupArgs, opts ...ResourceOption) (*PiNetworkSecurityGroup, error)
    public PiNetworkSecurityGroup(string name, PiNetworkSecurityGroupArgs args, CustomResourceOptions? opts = null)
    public PiNetworkSecurityGroup(String name, PiNetworkSecurityGroupArgs args)
    public PiNetworkSecurityGroup(String name, PiNetworkSecurityGroupArgs args, CustomResourceOptions options)
    
    type: ibm:PiNetworkSecurityGroup
    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 PiNetworkSecurityGroupArgs
    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 PiNetworkSecurityGroupArgs
    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 PiNetworkSecurityGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PiNetworkSecurityGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PiNetworkSecurityGroupArgs
    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 piNetworkSecurityGroupResource = new Ibm.PiNetworkSecurityGroup("piNetworkSecurityGroupResource", new()
    {
        PiCloudInstanceId = "string",
        PiName = "string",
        PiNetworkSecurityGroupId = "string",
        PiUserTags = new[]
        {
            "string",
        },
        Timeouts = new Ibm.Inputs.PiNetworkSecurityGroupTimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := ibm.NewPiNetworkSecurityGroup(ctx, "piNetworkSecurityGroupResource", &ibm.PiNetworkSecurityGroupArgs{
    	PiCloudInstanceId:        pulumi.String("string"),
    	PiName:                   pulumi.String("string"),
    	PiNetworkSecurityGroupId: pulumi.String("string"),
    	PiUserTags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ibm.PiNetworkSecurityGroupTimeoutsArgs{
    		Delete: pulumi.String("string"),
    	},
    })
    
    var piNetworkSecurityGroupResource = new PiNetworkSecurityGroup("piNetworkSecurityGroupResource", PiNetworkSecurityGroupArgs.builder()
        .piCloudInstanceId("string")
        .piName("string")
        .piNetworkSecurityGroupId("string")
        .piUserTags("string")
        .timeouts(PiNetworkSecurityGroupTimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    pi_network_security_group_resource = ibm.PiNetworkSecurityGroup("piNetworkSecurityGroupResource",
        pi_cloud_instance_id="string",
        pi_name="string",
        pi_network_security_group_id="string",
        pi_user_tags=["string"],
        timeouts={
            "delete": "string",
        })
    
    const piNetworkSecurityGroupResource = new ibm.PiNetworkSecurityGroup("piNetworkSecurityGroupResource", {
        piCloudInstanceId: "string",
        piName: "string",
        piNetworkSecurityGroupId: "string",
        piUserTags: ["string"],
        timeouts: {
            "delete": "string",
        },
    });
    
    type: ibm:PiNetworkSecurityGroup
    properties:
        piCloudInstanceId: string
        piName: string
        piNetworkSecurityGroupId: string
        piUserTags:
            - string
        timeouts:
            delete: string
    

    PiNetworkSecurityGroup 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 PiNetworkSecurityGroup resource accepts the following input properties:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiName string
    The name of the network security group.
    PiNetworkSecurityGroupId string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    PiUserTags List<string>
    A list of tags.
    Timeouts PiNetworkSecurityGroupTimeouts
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiName string
    The name of the network security group.
    PiNetworkSecurityGroupId string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    PiUserTags []string
    A list of tags.
    Timeouts PiNetworkSecurityGroupTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piName String
    The name of the network security group.
    piNetworkSecurityGroupId String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    piUserTags List<String>
    A list of tags.
    timeouts PiNetworkSecurityGroupTimeouts
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piName string
    The name of the network security group.
    piNetworkSecurityGroupId string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    piUserTags string[]
    A list of tags.
    timeouts PiNetworkSecurityGroupTimeouts
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_name str
    The name of the network security group.
    pi_network_security_group_id str
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    pi_user_tags Sequence[str]
    A list of tags.
    timeouts PiNetworkSecurityGroupTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piName String
    The name of the network security group.
    piNetworkSecurityGroupId String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    piUserTags List<String>
    A list of tags.
    timeouts Property Map

    Outputs

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

    Crn string
    (String) The network security group's crn.
    Default bool
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    Id string
    The provider-assigned unique ID for this managed resource.
    Members List<PiNetworkSecurityGroupMember>
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    NetworkSecurityGroupId string
    (String) The unique identifier of the network security group.
    Rules List<PiNetworkSecurityGroupRule>
    (List) The list of rules in the network security group.
    Crn string
    (String) The network security group's crn.
    Default bool
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    Id string
    The provider-assigned unique ID for this managed resource.
    Members []PiNetworkSecurityGroupMemberType
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    NetworkSecurityGroupId string
    (String) The unique identifier of the network security group.
    Rules []PiNetworkSecurityGroupRuleType
    (List) The list of rules in the network security group.
    crn String
    (String) The network security group's crn.
    default_ Boolean
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    members List<PiNetworkSecurityGroupMember>
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    networkSecurityGroupId String
    (String) The unique identifier of the network security group.
    rules List<PiNetworkSecurityGroupRule>
    (List) The list of rules in the network security group.
    crn string
    (String) The network security group's crn.
    default boolean
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    id string
    The provider-assigned unique ID for this managed resource.
    members PiNetworkSecurityGroupMember[]
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    networkSecurityGroupId string
    (String) The unique identifier of the network security group.
    rules PiNetworkSecurityGroupRule[]
    (List) The list of rules in the network security group.
    crn str
    (String) The network security group's crn.
    default bool
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    id str
    The provider-assigned unique ID for this managed resource.
    members Sequence[PiNetworkSecurityGroupMember]
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    network_security_group_id str
    (String) The unique identifier of the network security group.
    rules Sequence[PiNetworkSecurityGroupRule]
    (List) The list of rules in the network security group.
    crn String
    (String) The network security group's crn.
    default Boolean
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    members List<Property Map>
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    networkSecurityGroupId String
    (String) The unique identifier of the network security group.
    rules List<Property Map>
    (List) The list of rules in the network security group.

    Look up Existing PiNetworkSecurityGroup Resource

    Get an existing PiNetworkSecurityGroup 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?: PiNetworkSecurityGroupState, opts?: CustomResourceOptions): PiNetworkSecurityGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            crn: Optional[str] = None,
            default: Optional[bool] = None,
            members: Optional[Sequence[PiNetworkSecurityGroupMemberArgs]] = None,
            network_security_group_id: Optional[str] = None,
            pi_cloud_instance_id: Optional[str] = None,
            pi_name: Optional[str] = None,
            pi_network_security_group_id: Optional[str] = None,
            pi_user_tags: Optional[Sequence[str]] = None,
            rules: Optional[Sequence[PiNetworkSecurityGroupRuleArgs]] = None,
            timeouts: Optional[PiNetworkSecurityGroupTimeoutsArgs] = None) -> PiNetworkSecurityGroup
    func GetPiNetworkSecurityGroup(ctx *Context, name string, id IDInput, state *PiNetworkSecurityGroupState, opts ...ResourceOption) (*PiNetworkSecurityGroup, error)
    public static PiNetworkSecurityGroup Get(string name, Input<string> id, PiNetworkSecurityGroupState? state, CustomResourceOptions? opts = null)
    public static PiNetworkSecurityGroup get(String name, Output<String> id, PiNetworkSecurityGroupState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PiNetworkSecurityGroup    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:
    Crn string
    (String) The network security group's crn.
    Default bool
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    Members List<PiNetworkSecurityGroupMember>
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    NetworkSecurityGroupId string
    (String) The unique identifier of the network security group.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiName string
    The name of the network security group.
    PiNetworkSecurityGroupId string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    PiUserTags List<string>
    A list of tags.
    Rules List<PiNetworkSecurityGroupRule>
    (List) The list of rules in the network security group.
    Timeouts PiNetworkSecurityGroupTimeouts
    Crn string
    (String) The network security group's crn.
    Default bool
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    Members []PiNetworkSecurityGroupMemberTypeArgs
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    NetworkSecurityGroupId string
    (String) The unique identifier of the network security group.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiName string
    The name of the network security group.
    PiNetworkSecurityGroupId string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    PiUserTags []string
    A list of tags.
    Rules []PiNetworkSecurityGroupRuleTypeArgs
    (List) The list of rules in the network security group.
    Timeouts PiNetworkSecurityGroupTimeoutsArgs
    crn String
    (String) The network security group's crn.
    default_ Boolean
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    members List<PiNetworkSecurityGroupMember>
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    networkSecurityGroupId String
    (String) The unique identifier of the network security group.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piName String
    The name of the network security group.
    piNetworkSecurityGroupId String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    piUserTags List<String>
    A list of tags.
    rules List<PiNetworkSecurityGroupRule>
    (List) The list of rules in the network security group.
    timeouts PiNetworkSecurityGroupTimeouts
    crn string
    (String) The network security group's crn.
    default boolean
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    members PiNetworkSecurityGroupMember[]
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    networkSecurityGroupId string
    (String) The unique identifier of the network security group.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piName string
    The name of the network security group.
    piNetworkSecurityGroupId string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    piUserTags string[]
    A list of tags.
    rules PiNetworkSecurityGroupRule[]
    (List) The list of rules in the network security group.
    timeouts PiNetworkSecurityGroupTimeouts
    crn str
    (String) The network security group's crn.
    default bool
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    members Sequence[PiNetworkSecurityGroupMemberArgs]
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    network_security_group_id str
    (String) The unique identifier of the network security group.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_name str
    The name of the network security group.
    pi_network_security_group_id str
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    pi_user_tags Sequence[str]
    A list of tags.
    rules Sequence[PiNetworkSecurityGroupRuleArgs]
    (List) The list of rules in the network security group.
    timeouts PiNetworkSecurityGroupTimeoutsArgs
    crn String
    (String) The network security group's crn.
    default Boolean
    (Boolean) Indicates if the network security group is the default network security group in the workspace.
    members List<Property Map>
    (List) The list of IPv4 addresses and\or network interfaces in the network security group.
    networkSecurityGroupId String
    (String) The unique identifier of the network security group.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piName String
    The name of the network security group.
    piNetworkSecurityGroupId String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    piUserTags List<String>
    A list of tags.
    rules List<Property Map>
    (List) The list of rules in the network security group.
    timeouts Property Map

    Supporting Types

    PiNetworkSecurityGroupMember, PiNetworkSecurityGroupMemberArgs

    Id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    MacAddress string
    (String) The mac address of a network interface included if the type is network-interface.
    NetworkInterfaceId string
    (String) The network ID of a network interface included if the type is network-interface.
    Target string
    (String) If ipv4-address type, then IPv4 address or if network-interface type, then network interface id.
    Type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    Id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    MacAddress string
    (String) The mac address of a network interface included if the type is network-interface.
    NetworkInterfaceId string
    (String) The network ID of a network interface included if the type is network-interface.
    Target string
    (String) If ipv4-address type, then IPv4 address or if network-interface type, then network interface id.
    Type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    id String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    macAddress String
    (String) The mac address of a network interface included if the type is network-interface.
    networkInterfaceId String
    (String) The network ID of a network interface included if the type is network-interface.
    target String
    (String) If ipv4-address type, then IPv4 address or if network-interface type, then network interface id.
    type String
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    macAddress string
    (String) The mac address of a network interface included if the type is network-interface.
    networkInterfaceId string
    (String) The network ID of a network interface included if the type is network-interface.
    target string
    (String) If ipv4-address type, then IPv4 address or if network-interface type, then network interface id.
    type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    id str
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    mac_address str
    (String) The mac address of a network interface included if the type is network-interface.
    network_interface_id str
    (String) The network ID of a network interface included if the type is network-interface.
    target str
    (String) If ipv4-address type, then IPv4 address or if network-interface type, then network interface id.
    type str
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    id String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    macAddress String
    (String) The mac address of a network interface included if the type is network-interface.
    networkInterfaceId String
    (String) The network ID of a network interface included if the type is network-interface.
    target String
    (String) If ipv4-address type, then IPv4 address or if network-interface type, then network interface id.
    type String
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.

    PiNetworkSecurityGroupRule, PiNetworkSecurityGroupRuleArgs

    Action string
    (String) The action to take if the rule matches network traffic. Supported values are: allow, deny.
    DestinationPorts List<PiNetworkSecurityGroupRuleDestinationPort>
    (List) The list of destination port.
    Id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    Protocols List<PiNetworkSecurityGroupRuleProtocol>
    (List) The list of protocol.
    Remotes List<PiNetworkSecurityGroupRuleRemote>
    (List) List of remote.
    SourcePorts List<PiNetworkSecurityGroupRuleSourcePort>
    (List) List of source port
    Action string
    (String) The action to take if the rule matches network traffic. Supported values are: allow, deny.
    DestinationPorts []PiNetworkSecurityGroupRuleDestinationPort
    (List) The list of destination port.
    Id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    Protocols []PiNetworkSecurityGroupRuleProtocol
    (List) The list of protocol.
    Remotes []PiNetworkSecurityGroupRuleRemote
    (List) List of remote.
    SourcePorts []PiNetworkSecurityGroupRuleSourcePort
    (List) List of source port
    action String
    (String) The action to take if the rule matches network traffic. Supported values are: allow, deny.
    destinationPorts List<PiNetworkSecurityGroupRuleDestinationPort>
    (List) The list of destination port.
    id String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    protocols List<PiNetworkSecurityGroupRuleProtocol>
    (List) The list of protocol.
    remotes List<PiNetworkSecurityGroupRuleRemote>
    (List) List of remote.
    sourcePorts List<PiNetworkSecurityGroupRuleSourcePort>
    (List) List of source port
    action string
    (String) The action to take if the rule matches network traffic. Supported values are: allow, deny.
    destinationPorts PiNetworkSecurityGroupRuleDestinationPort[]
    (List) The list of destination port.
    id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    protocols PiNetworkSecurityGroupRuleProtocol[]
    (List) The list of protocol.
    remotes PiNetworkSecurityGroupRuleRemote[]
    (List) List of remote.
    sourcePorts PiNetworkSecurityGroupRuleSourcePort[]
    (List) List of source port
    action str
    (String) The action to take if the rule matches network traffic. Supported values are: allow, deny.
    destination_ports Sequence[PiNetworkSecurityGroupRuleDestinationPort]
    (List) The list of destination port.
    id str
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    protocols Sequence[PiNetworkSecurityGroupRuleProtocol]
    (List) The list of protocol.
    remotes Sequence[PiNetworkSecurityGroupRuleRemote]
    (List) List of remote.
    source_ports Sequence[PiNetworkSecurityGroupRuleSourcePort]
    (List) List of source port
    action String
    (String) The action to take if the rule matches network traffic. Supported values are: allow, deny.
    destinationPorts List<Property Map>
    (List) The list of destination port.
    id String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    protocols List<Property Map>
    (List) The list of protocol.
    remotes List<Property Map>
    (List) List of remote.
    sourcePorts List<Property Map>
    (List) List of source port

    PiNetworkSecurityGroupRuleDestinationPort, PiNetworkSecurityGroupRuleDestinationPortArgs

    Maximum double
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    Minimum double
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    Maximum float64
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    Minimum float64
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    maximum Double
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    minimum Double
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    maximum number
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    minimum number
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    maximum float
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    minimum float
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    maximum Number
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    minimum Number
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.

    PiNetworkSecurityGroupRuleProtocol, PiNetworkSecurityGroupRuleProtocolArgs

    IcmpType string
    (String) If icmp type, a ICMP packet type affected by ICMP rules and if not present then all types are matched.
    TcpFlags List<PiNetworkSecurityGroupRuleProtocolTcpFlag>
    (String) If tcp type, the list of TCP flags and if not present then all flags are matched. Supported values are: syn, ack, fin, rst.
    Type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    IcmpType string
    (String) If icmp type, a ICMP packet type affected by ICMP rules and if not present then all types are matched.
    TcpFlags []PiNetworkSecurityGroupRuleProtocolTcpFlag
    (String) If tcp type, the list of TCP flags and if not present then all flags are matched. Supported values are: syn, ack, fin, rst.
    Type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    icmpType String
    (String) If icmp type, a ICMP packet type affected by ICMP rules and if not present then all types are matched.
    tcpFlags List<PiNetworkSecurityGroupRuleProtocolTcpFlag>
    (String) If tcp type, the list of TCP flags and if not present then all flags are matched. Supported values are: syn, ack, fin, rst.
    type String
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    icmpType string
    (String) If icmp type, a ICMP packet type affected by ICMP rules and if not present then all types are matched.
    tcpFlags PiNetworkSecurityGroupRuleProtocolTcpFlag[]
    (String) If tcp type, the list of TCP flags and if not present then all flags are matched. Supported values are: syn, ack, fin, rst.
    type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    icmp_type str
    (String) If icmp type, a ICMP packet type affected by ICMP rules and if not present then all types are matched.
    tcp_flags Sequence[PiNetworkSecurityGroupRuleProtocolTcpFlag]
    (String) If tcp type, the list of TCP flags and if not present then all flags are matched. Supported values are: syn, ack, fin, rst.
    type str
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    icmpType String
    (String) If icmp type, a ICMP packet type affected by ICMP rules and if not present then all types are matched.
    tcpFlags List<Property Map>
    (String) If tcp type, the list of TCP flags and if not present then all flags are matched. Supported values are: syn, ack, fin, rst.
    type String
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.

    PiNetworkSecurityGroupRuleProtocolTcpFlag, PiNetworkSecurityGroupRuleProtocolTcpFlagArgs

    Flag string
    Flag string
    flag String
    flag string
    flag str
    flag String

    PiNetworkSecurityGroupRuleRemote, PiNetworkSecurityGroupRuleRemoteArgs

    Id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    Type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    Id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    Type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    id String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    type String
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    id string
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    type string
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    id str
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    type str
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.
    id String
    (String) The id of the remote network address group or network security group the rules apply to. Not required for default-network-address-group.
    type String
    (String) The type of remote group the rules apply to. Supported values are: network-security-group, network-address-group, default-network-address-group.

    PiNetworkSecurityGroupRuleSourcePort, PiNetworkSecurityGroupRuleSourcePortArgs

    Maximum double
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    Minimum double
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    Maximum float64
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    Minimum float64
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    maximum Double
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    minimum Double
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    maximum number
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    minimum number
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    maximum float
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    minimum float
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.
    maximum Number
    (Integer) The end of the port range, if applicable. If the value is not present then the default value of 65535 will be the maximum port number.
    minimum Number
    (Integer) The start of the port range, if applicable. If the value is not present then the default value of 1 will be the minimum port number.

    PiNetworkSecurityGroupTimeouts, PiNetworkSecurityGroupTimeoutsArgs

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

    Import

    The ibm_pi_network_security_group resource can be imported by using cloud_instance_id and network_security_group_id.

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

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud