This document version is no longer actively maintained.
The site that you are currently viewing is an archived snapshot.
For up-to-date documentation, see the latest version.
powerscale_role (Data Source)
This datasource is used to query the existing roles 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 permit and limit access to administrative areas of your cluster on a per-user basis through roles.
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 from PowerScale array.
# Returns a list of PowerScale Role based on the filters specified in the filter block.
data "powerscale_role" "test" {
filter {
names = ["SystemAdmin"]
zone = "System"
}
}
# Output value of above block by executing 'terraform output' command
# You can use the the fetched information by the variable data.powerscale_role.test
output "powerscale_role" {
value = data.powerscale_role.test
}
# Returns all PowerScale Role on PowerScale array
data "powerscale_role" "all" {
}
# Output value of above block by executing 'terraform output' command
# You can use the the fetched information by the variable data.powerscale_role.all
output "powerscale_role_data_all" {
value = data.powerscale_role.all
}
Schema
Optional
filter
(Block, Optional) (see below for nested schema)
Read-Only
id
(String) Unique identifier of the network pool instance.roles_details
(Attributes List) List of Roles. (see below for nested schema)
Nested Schema for filter
Optional:
names
(Set of String) Filter roles by names.zone
(String) Specifies which access zone to use.
Nested Schema for roles_details
Read-Only:
description
(String) Specifies the description of the role.id
(String) Specifies the ID of the role.members
(Attributes List) Specifies the users or groups that have this role. (see below for nested schema)name
(String) Specifies the name of the role.privileges
(Attributes List) Specifies the privileges granted by this role. (see below for nested schema)
Nested Schema for roles_details.members
Read-Only:
id
(String) Specifies the serialized form of a persona, which can be ‘UID:0’, ‘USER:name’, ‘GID:0’, ‘GROUP:wheel’, or ‘SID:S-1-1’.name
(String) Specifies the persona name, which must be combined with a type.type
(String) Specifies the type of persona, which must be combined with a name.
Nested Schema for roles_details.privileges
Read-Only:
id
(String) Specifies the ID of the privilege.name
(String) Specifies the name of the privilege.permission
(String) permission of the privilege, ‘r’ = read , ‘x’ = read-execute, ‘w’ = read-execute-write, ‘-’ = no permission