powerscale_network_rule (Resource)

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

/*
Copyright (c) 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.
*/

# Available actions: Create, Update, Delete and Import
# After `terraform apply` of this example file for the first time, you will create a network rule on the PowerScale

# PowerScale network rule allows you to manage the network rule on the Powerscale array
resource "powerscale_network_rule" "rule" {
  # Required. Name of the provisioning rule.
  name = "tfacc_rule"
  # Required.
  groupnet = "groupnet0"
  # Required.
  subnet = "subnet0"
  # Required.
  pool = "pool0"
  # Required. Interface name the provisioning rule applies to.
  iface = "ext-2"
  # Optional. Description for the provisioning rule.
  description = "tfacc_rule"
  # Optional. Node type the provisioning rule applies to.
  node_type = "any"
}

# After the execution of above resource block, network rule would have been created on the PowerScale array.
# For more information, Please check the terraform state file.

Schema

Required

  • 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.
  • pool (String) Name of the pool this rule belongs to.
  • subnet (String) Name of the subnet this rule belongs to.

Optional

  • description (String) Description for the provisioning rule.
  • node_type (String) Node type the provisioning rule applies to.

Read-Only

  • id (String) Unique rule ID.

Unless specified otherwise, all fields of this resource can be updated.

Import

Import is supported using the following syntax:

# 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
# terraform import powerscale_network_rule.rule groupnet_name.subnet_name.pool_name.rule_name
# Example:
terraform import powerscale_network_rule.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.