powerscale_network_rule (Data Source)

This datasource is used to query the existing network rules from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block.

Example Usage

/*
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.
*/

# This Terraform DataSource is used to query the details of existing network rules from PowerScale array.

# Returns a list of PowerScale network rules based on names and query parameters specified in the filter block.
data "powerscale_network_rule" "test" {
  filter {
    #   Optional query parameters
    #   Note: the following filters will be applied with AND logic
    names = ["rule0"]

    # Optional
    groupnet = "groupnet0"
    subnet   = "subnet0"
    pool     = "pool0"
  }
}

# Output value of above block by executing 'terraform output' command
# You can use the the fetched information by the variable data.powerscale_network_rule.test
output "powerscale_network_rule" {
  value = data.powerscale_network_rule.test
}

# Returns all PowerScale network rules on PowerScale array
data "powerscale_network_rule" "all" {
}

# Output value of above block by executing 'terraform output' command
# You can use the the fetched information by the variable data.powerscale_network_rule.all
output "powerscale_network_rule_data_all" {
  value = data.powerscale_network_rule.all
}

Schema

Optional

Read-Only

  • id (String) Unique identifier of the network rule.
  • network_rules (Attributes List) List of Network Rules. (see below for nested schema)

Nested Schema for filter

Optional:

  • groupnet (String) If specified, only rules for this groupnet will be returned.
  • names (Set of String) Filter network rules by names.
  • pool (String) If specified, only rules for this pool will be returned.
  • subnet (String) If specified, only rules for this subnet will be returned.

Nested Schema for network_rules

Read-Only:

  • description (String) Description for the provisioning rule.
  • groupnet (String) Name of the groupnet this rule belongs to
  • id (String) Unique rule ID.
  • iface (String) Interface name the provisioning rule applies to.
  • name (String) Name of the provisioning rule.
  • node_type (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.