powerscale_user_group (Resource)
This resource is used to manage the User Group entity of PowerScale Array. We can Create, Update and Delete the User Group using this resource. We can also import an existing User Group from PowerScale array. PowerScale User Group allows you to do operations on a set of users, groups and well-knowns.
Example Usage
/*
Copyright (c) 2023 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 it will create a new user group with the name set in `name` attribute on the PowerScale.
# PowerScale User Group allows you to do operations on a set of users, groups and well-knowns.
resource "powerscale_user_group" "testUserGroup" {
# Required name for creating
name = "testUserGroupResourceSample"
# Optional query_force. If true, skip validation checks when creating user group. The force option is required for user group ID changes.
# query_force = false
# Optional query_zone, will return user group according to zone. Specifies the zone that the user group will belong to when creating. Once user group is created, its zone cannot be changed.
# query_zone = "testZone"
# Optional query_provider, will return user group according to provider. Specifies the provider that the user group will belong to when creating. Once user group is created, its provider cannot be changed.
# query_provider = "testProvider"
# Optional parameters when creating
# sid = "SID:XXXX"
# Optional parameters when creating and updating.
# gid = 11000
# roles = ["SystemAdmin"]
# users = ["MemberOfUser"]
# groups = ["MemberOfGroup"]
# well_knowns = ["MemberOfWellKnown"]
}
# After the execution of above resource block, user group would have been created on the PowerScale array.
# For more information, Please check the terraform state file.
Schema
Required
name
(String) Specifies a user group name.
Optional
domain
(String) Specifies the domain that the object is part of.gid
(Number) Specifies a numeric user group identifier. (Update Supported)groups
(List of String) Specifies list members of group within the group. (Update Supported)query_force
(Boolean) If true, skip validation checks when creating user group. Need to be true, when changing group GID.query_provider
(String) Specifies the provider type.query_zone
(String) Specifies the zone that the object belongs to.roles
(List of String) List of roles, the user is assigned. (Update Supported)sid
(String) Specifies a security identifier.users
(List of String) Specifies list members of user within the group. (Update Supported)well_knowns
(List of String) Specifies list members of well_known within the group. (Update Supported)
Read-Only
dn
(String) Specifies a principal name for the user group.dns_domain
(String) Specifies the DNS domain.generated_gid
(Boolean) If true, the GID was generated.id
(String) Specifies the user group ID.provider_name
(String) Specifies the authentication provider that the object belongs to.sam_account_name
(String) Specifies a user group name.type
(String) Specifies the object type.
Import
Import is supported using the following syntax:
# Copyright (c) 2023 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_user_group.testUserGroup [<zoneID>:]<userGroupName>
# Example1, <zoneID> is Optional, defaults to System:
terraform import powerscale_user_group.testUserGroup userGroupName
# Example2:
terraform import powerscale_user_group.testUserGroup zoneID:userGroupName
# 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.