1. Packages
  2. Powerscale Provider
  3. API Docs
  4. NetworkRule
powerscale 1.7.1 published on Wednesday, Apr 30, 2025 by dell

powerscale.NetworkRule

Explore with Pulumi AI

powerscale logo
powerscale 1.7.1 published on Wednesday, Apr 30, 2025 by dell

    This resource is used to manage the Network Rule entity on PowerScale array. We can Create, Update and Delete the Network Rule using this resource. We can also import an existing Network Rule from PowerScale array.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as powerscale from "@pulumi/powerscale";
    
    // PowerScale network rule allows you to manage the network rule on the Powerscale array
    const rule = new powerscale.NetworkRule("rule", {
        description: "tfacc_rule",
        groupnet: "groupnet0",
        iface: "ext-2",
        nodeType: "any",
        pool: "pool0",
        subnet: "subnet0",
    });
    
    import pulumi
    import pulumi_powerscale as powerscale
    
    # PowerScale network rule allows you to manage the network rule on the Powerscale array
    rule = powerscale.NetworkRule("rule",
        description="tfacc_rule",
        groupnet="groupnet0",
        iface="ext-2",
        node_type="any",
        pool="pool0",
        subnet="subnet0")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/powerscale/powerscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// PowerScale network rule allows you to manage the network rule on the Powerscale array
    		_, err := powerscale.NewNetworkRule(ctx, "rule", &powerscale.NetworkRuleArgs{
    			Description: pulumi.String("tfacc_rule"),
    			Groupnet:    pulumi.String("groupnet0"),
    			Iface:       pulumi.String("ext-2"),
    			NodeType:    pulumi.String("any"),
    			Pool:        pulumi.String("pool0"),
    			Subnet:      pulumi.String("subnet0"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Powerscale = Pulumi.Powerscale;
    
    return await Deployment.RunAsync(() => 
    {
        // PowerScale network rule allows you to manage the network rule on the Powerscale array
        var rule = new Powerscale.NetworkRule("rule", new()
        {
            Description = "tfacc_rule",
            Groupnet = "groupnet0",
            Iface = "ext-2",
            NodeType = "any",
            Pool = "pool0",
            Subnet = "subnet0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.powerscale.NetworkRule;
    import com.pulumi.powerscale.NetworkRuleArgs;
    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) {
            // PowerScale network rule allows you to manage the network rule on the Powerscale array
            var rule = new NetworkRule("rule", NetworkRuleArgs.builder()
                .description("tfacc_rule")
                .groupnet("groupnet0")
                .iface("ext-2")
                .nodeType("any")
                .pool("pool0")
                .subnet("subnet0")
                .build());
    
        }
    }
    
    resources:
      # PowerScale network rule allows you to manage the network rule on the Powerscale array
      rule:
        type: powerscale:NetworkRule
        properties:
          # Optional. Description for the provisioning rule.
          description: tfacc_rule
          # Required.
          groupnet: groupnet0
          # Required. Interface name the provisioning rule applies to.
          iface: ext-2
          # Optional. Node type the provisioning rule applies to.
          nodeType: any
          # Required.
          pool: pool0
          # Required.
          subnet: subnet0
    

    Create NetworkRule Resource

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

    Constructor syntax

    new NetworkRule(name: string, args: NetworkRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkRule(resource_name: str,
                    args: NetworkRuleArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkRule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    groupnet: Optional[str] = None,
                    iface: Optional[str] = None,
                    pool: Optional[str] = None,
                    subnet: Optional[str] = None,
                    description: Optional[str] = None,
                    name: Optional[str] = None,
                    node_type: Optional[str] = None)
    func NewNetworkRule(ctx *Context, name string, args NetworkRuleArgs, opts ...ResourceOption) (*NetworkRule, error)
    public NetworkRule(string name, NetworkRuleArgs args, CustomResourceOptions? opts = null)
    public NetworkRule(String name, NetworkRuleArgs args)
    public NetworkRule(String name, NetworkRuleArgs args, CustomResourceOptions options)
    
    type: powerscale:NetworkRule
    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 NetworkRuleArgs
    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 NetworkRuleArgs
    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 NetworkRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkRuleArgs
    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 networkRuleResource = new Powerscale.NetworkRule("networkRuleResource", new()
    {
        Groupnet = "string",
        Iface = "string",
        Pool = "string",
        Subnet = "string",
        Description = "string",
        Name = "string",
        NodeType = "string",
    });
    
    example, err := powerscale.NewNetworkRule(ctx, "networkRuleResource", &powerscale.NetworkRuleArgs{
    	Groupnet:    pulumi.String("string"),
    	Iface:       pulumi.String("string"),
    	Pool:        pulumi.String("string"),
    	Subnet:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	NodeType:    pulumi.String("string"),
    })
    
    var networkRuleResource = new NetworkRule("networkRuleResource", NetworkRuleArgs.builder()
        .groupnet("string")
        .iface("string")
        .pool("string")
        .subnet("string")
        .description("string")
        .name("string")
        .nodeType("string")
        .build());
    
    network_rule_resource = powerscale.NetworkRule("networkRuleResource",
        groupnet="string",
        iface="string",
        pool="string",
        subnet="string",
        description="string",
        name="string",
        node_type="string")
    
    const networkRuleResource = new powerscale.NetworkRule("networkRuleResource", {
        groupnet: "string",
        iface: "string",
        pool: "string",
        subnet: "string",
        description: "string",
        name: "string",
        nodeType: "string",
    });
    
    type: powerscale:NetworkRule
    properties:
        description: string
        groupnet: string
        iface: string
        name: string
        nodeType: string
        pool: string
        subnet: string
    

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

    Groupnet string
    Name of the groupnet this rule belongs to
    Iface string
    Interface name the provisioning rule applies to.
    Pool string
    Name of the pool this rule belongs to.
    Subnet string
    Name of the subnet this rule belongs to.
    Description string
    Description for the provisioning rule.
    Name string
    Name of the provisioning rule.
    NodeType string
    Node type the provisioning rule applies to.
    Groupnet string
    Name of the groupnet this rule belongs to
    Iface string
    Interface name the provisioning rule applies to.
    Pool string
    Name of the pool this rule belongs to.
    Subnet string
    Name of the subnet this rule belongs to.
    Description string
    Description for the provisioning rule.
    Name string
    Name of the provisioning rule.
    NodeType string
    Node type the provisioning rule applies to.
    groupnet String
    Name of the groupnet this rule belongs to
    iface String
    Interface name the provisioning rule applies to.
    pool String
    Name of the pool this rule belongs to.
    subnet String
    Name of the subnet this rule belongs to.
    description String
    Description for the provisioning rule.
    name String
    Name of the provisioning rule.
    nodeType String
    Node type the provisioning rule applies to.
    groupnet string
    Name of the groupnet this rule belongs to
    iface string
    Interface name the provisioning rule applies to.
    pool string
    Name of the pool this rule belongs to.
    subnet string
    Name of the subnet this rule belongs to.
    description string
    Description for the provisioning rule.
    name string
    Name of the provisioning rule.
    nodeType string
    Node type the provisioning rule applies to.
    groupnet str
    Name of the groupnet this rule belongs to
    iface str
    Interface name the provisioning rule applies to.
    pool str
    Name of the pool this rule belongs to.
    subnet str
    Name of the subnet this rule belongs to.
    description str
    Description for the provisioning rule.
    name str
    Name of the provisioning rule.
    node_type str
    Node type the provisioning rule applies to.
    groupnet String
    Name of the groupnet this rule belongs to
    iface String
    Interface name the provisioning rule applies to.
    pool String
    Name of the pool this rule belongs to.
    subnet String
    Name of the subnet this rule belongs to.
    description String
    Description for the provisioning rule.
    name String
    Name of the provisioning rule.
    nodeType String
    Node type the provisioning rule applies to.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkRule 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 NetworkRule Resource

    Get an existing NetworkRule 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?: NetworkRuleState, opts?: CustomResourceOptions): NetworkRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            groupnet: Optional[str] = None,
            iface: Optional[str] = None,
            name: Optional[str] = None,
            node_type: Optional[str] = None,
            pool: Optional[str] = None,
            subnet: Optional[str] = None) -> NetworkRule
    func GetNetworkRule(ctx *Context, name string, id IDInput, state *NetworkRuleState, opts ...ResourceOption) (*NetworkRule, error)
    public static NetworkRule Get(string name, Input<string> id, NetworkRuleState? state, CustomResourceOptions? opts = null)
    public static NetworkRule get(String name, Output<String> id, NetworkRuleState state, CustomResourceOptions options)
    resources:  _:    type: powerscale:NetworkRule    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
    Description for the provisioning rule.
    Groupnet string
    Name of the groupnet this rule belongs to
    Iface string
    Interface name the provisioning rule applies to.
    Name string
    Name of the provisioning rule.
    NodeType string
    Node type the provisioning rule applies to.
    Pool string
    Name of the pool this rule belongs to.
    Subnet string
    Name of the subnet this rule belongs to.
    Description string
    Description for the provisioning rule.
    Groupnet string
    Name of the groupnet this rule belongs to
    Iface string
    Interface name the provisioning rule applies to.
    Name string
    Name of the provisioning rule.
    NodeType string
    Node type the provisioning rule applies to.
    Pool string
    Name of the pool this rule belongs to.
    Subnet string
    Name of the subnet this rule belongs to.
    description String
    Description for the provisioning rule.
    groupnet String
    Name of the groupnet this rule belongs to
    iface String
    Interface name the provisioning rule applies to.
    name String
    Name of the provisioning rule.
    nodeType String
    Node type the provisioning rule applies to.
    pool String
    Name of the pool this rule belongs to.
    subnet String
    Name of the subnet this rule belongs to.
    description string
    Description for the provisioning rule.
    groupnet string
    Name of the groupnet this rule belongs to
    iface string
    Interface name the provisioning rule applies to.
    name string
    Name of the provisioning rule.
    nodeType string
    Node type the provisioning rule applies to.
    pool string
    Name of the pool this rule belongs to.
    subnet string
    Name of the subnet this rule belongs to.
    description str
    Description for the provisioning rule.
    groupnet str
    Name of the groupnet this rule belongs to
    iface str
    Interface name the provisioning rule applies to.
    name str
    Name of the provisioning rule.
    node_type str
    Node type the provisioning rule applies to.
    pool str
    Name of the pool this rule belongs to.
    subnet str
    Name of the subnet this rule belongs to.
    description String
    Description for the provisioning rule.
    groupnet String
    Name of the groupnet this rule belongs to
    iface String
    Interface name the provisioning rule applies to.
    name String
    Name of the provisioning rule.
    nodeType String
    Node type the provisioning rule applies to.
    pool String
    Name of the pool this rule belongs to.
    subnet String
    Name of the subnet this rule belongs to.

    Import

    Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.

    Licensed under the Mozilla Public License Version 2.0 (the “License”);

    you may not use this file except in compliance with the License.

    You may obtain a copy of the License at

    http://mozilla.org/MPL/2.0/
    

    Unless required by applicable law or agreed to in writing, software

    distributed under the License is distributed on an “AS IS” BASIS,

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

    See the License for the specific language governing permissions and

    limitations under the License.

    The command is

    $ pulumi import powerscale:index/networkRule:NetworkRule rule groupnet_name.subnet_name.pool_name.rule_name
    

    Example:

    $ pulumi import powerscale:index/networkRule:NetworkRule rule groupnet0.subnet0.pool0.rule_name
    

    after running this command, populate the name field and other required parameters in the config file to start managing this resource.

    Note: running “terraform show” after importing shows the current config/state of the resource. You can copy/paste that config to make it easier to manage the resource.

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

    Package Details

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