powerscale_roleprivilege (Data Source)

This datasource is used to query the existing Role Privileges from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. You can designate certain privileges as no permission, read, execute, or write when adding the privilege to a role.

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

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

# Returns a list of PowerScale role privileges based on names in the filter block.
data "powerscale_roleprivilege" "test" {
  filter {
    #  Optional query parameters
    #  This will return the role privileges whose name contains the key word (case-insensitive)
    names = ["Shutdown"]
  }
}

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

# Returns all PowerScale role privileges on PowerScale array
data "powerscale_roleprivilege" "all" {
}

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

Schema

Optional

Read-Only

  • id (String) Unique identifier of the Role Privilege instance.
  • role_privileges_details (Attributes List) List of Role Privileges. (see below for nested schema)

Nested Schema for filter

Optional:

  • names (Set of String) Filter Role Privileges by names.

Nested Schema for role_privileges_details

Read-Only:

  • category (String) Specifies the general categorization of the privilege.
  • description (String) Specifies a short description of the privilege.
  • id (String) Specifies the ID of the privilege.
  • name (String) Specifies the name of the privilege.
  • parent_id (String) Specifies the parent ID of the privilege.
  • permission (String) Permissions the privilege has r=read , x=read-execute, w=read-execute-write.
  • privilegelevel (String) Specifies the level of the privilege.
  • uri (String) Specifies the associated uri for the privilege.