powerscale_user (Data Source)

This datasource is used to query the existing Users from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. PowerScale User allows you to authenticate through a local authentication provider. Remote users are restricted to read-only operations.

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

# PowerScale User allows you to authenticate through a local authentication provider. Remote users are restricted to read-only operations.

# Returns a list of PowerScale Users based on uid or name in names filter block. 
data "powerscale_user" "test_user" {
  filter {
    # Optional list of names to filter upon
    names = [
      # {
      #   uid = 0
      # },
      # {
      #   name = "admin"
      # },
      {
        name = "tfaccUserDatasource"
        uid  = 10000
      }
    ]

    # Optional query parameters.
    cached      = false
    name_prefix = "tfacc"
    member_of   = false
    # domain = "testDomain"
    # zone = "testZone"
    # provider = "testProvider"
  }
}

# Output value of above block by executing 'terraform output' command.
# The user can use the fetched information by the variable data.powerscale_user.test_user
output "powerscale_user_filter" {
  value = data.powerscale_user.test_user
}

# After the successful execution of above said block, We can see the output value by executing 'terraform output' command.

Schema

Optional

Read-Only

  • id (String) Unique identifier of the user instance.
  • users (Attributes List) List of users. (see below for nested schema)

Nested Schema for filter

Optional:

  • cached (Boolean) If true, only return cached objects.
  • domain (String) Filter users by domain.
  • member_of (Boolean) Enumerate all users that a group is a member of.
  • name_prefix (String) Filter users by name prefix.
  • names (Attributes List) List of user identity. (see below for nested schema)
  • provider (String) Filter users by provider.
  • zone (String) Filter users by zone.

Nested Schema for filter.names

Optional:

  • name (String) Specifies a user name.
  • uid (Number) Specifies a numeric user identifier.

Nested Schema for users

Optional:

  • dn (String) Specifies a principal name for the user.
  • dns_domain (String) Specifies the DNS domain.
  • domain (String) Specifies the domain that the object is part of.
  • email (String) Specifies an email address.
  • enabled (Boolean) If true, the authenticated user is enabled.
  • expired (Boolean) If true, the authenticated user has expired.
  • expiry (Number) Specifies the Unix Epoch time at which the authenticated user will expire.
  • gecos (String) Specifies the GECOS value, which is usually the full name.
  • generated_gid (Boolean) If true, the GID was generated.
  • generated_uid (Boolean) If true, the UID was generated.
  • generated_upn (Boolean) If true, the UPN was generated.
  • gid (String) Specifies a group identifier.
  • home_directory (String) Specifies a home directory for the user.
  • id (String) Specifies the user ID.
  • locked (Boolean) If true, indicates that the account is locked.
  • max_password_age (Number) Specifies the maximum time in seconds allowed before the password expires.
  • name (String) Specifies a user name.
  • password_expired (Boolean) If true, the password has expired.
  • password_expires (Boolean) If true, the password is allowed to expire.
  • password_expiry (Number) Specifies the time in Unix Epoch seconds that the password will expire.
  • password_last_set (Number) Specifies the last time the password was set.
  • primary_group_sid (String) Specifies the persona of the primary group.
  • prompt_password_change (Boolean) If true, Prompts the user to change their password at the next login.
  • provider (String) Specifies the authentication provider that the object belongs to.
  • sam_account_name (String) Specifies a user name.
  • shell (String) Specifies a path to the shell for the user.
  • sid (String) Specifies a security identifier.
  • type (String) Specifies the object type.
  • uid (String) Specifies a user identifier.
  • upn (String) Specifies a principal name for the user.
  • user_can_change_password (Boolean) Specifies whether the password for the user can be changed.

Read-Only:

  • roles (List of String) List of roles.