1. Packages
  2. Powerscale Provider
  3. API Docs
  4. NetworkRule
powerscale 1.7.0 published on Monday, Apr 14, 2025 by dell

powerscale.NetworkRule

Explore with Pulumi AI

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

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

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 This property is required. string
The unique name of the resource.
args This property is required. NetworkRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. NetworkRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
var networkRuleResource = new NetworkRule("networkRuleResource", NetworkRuleArgs.builder()
    .groupnet("string")
    .iface("string")
    .pool("string")
    .subnet("string")
    .description("string")
    .name("string")
    .nodeType("string")
    .build());
Copy
network_rule_resource = powerscale.NetworkRule("networkRuleResource",
    groupnet="string",
    iface="string",
    pool="string",
    subnet="string",
    description="string",
    name="string",
    node_type="string")
Copy
const networkRuleResource = new powerscale.NetworkRule("networkRuleResource", {
    groupnet: "string",
    iface: "string",
    pool: "string",
    subnet: "string",
    description: "string",
    name: "string",
    nodeType: "string",
});
Copy
type: powerscale:NetworkRule
properties:
    description: string
    groupnet: string
    iface: string
    name: string
    nodeType: string
    pool: string
    subnet: string
Copy

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 This property is required. string
Name of the groupnet this rule belongs to
Iface This property is required. string
Interface name the provisioning rule applies to.
Pool This property is required. string
Name of the pool this rule belongs to.
Subnet This property is required. 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 This property is required. string
Name of the groupnet this rule belongs to
Iface This property is required. string
Interface name the provisioning rule applies to.
Pool This property is required. string
Name of the pool this rule belongs to.
Subnet This property is required. 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 This property is required. String
Name of the groupnet this rule belongs to
iface This property is required. String
Interface name the provisioning rule applies to.
pool This property is required. String
Name of the pool this rule belongs to.
subnet This property is required. 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 This property is required. string
Name of the groupnet this rule belongs to
iface This property is required. string
Interface name the provisioning rule applies to.
pool This property is required. string
Name of the pool this rule belongs to.
subnet This property is required. 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 This property is required. str
Name of the groupnet this rule belongs to
iface This property is required. str
Interface name the provisioning rule applies to.
pool This property is required. str
Name of the pool this rule belongs to.
subnet This property is required. 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 This property is required. String
Name of the groupnet this rule belongs to
iface This property is required. String
Interface name the provisioning rule applies to.
pool This property is required. String
Name of the pool this rule belongs to.
subnet This property is required. 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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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
Copy

Example:

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

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.