User

Redfish iDRAC User Terraform module

Terraform module which create, delete and modify multiple users.

This module is a wrapper around https://github.com/dell/terraform-provider-redfish/blob/main/redfish/provider/resource_redfish_user_account.go On create, the module creates users one by one, using the Terraform Provider for Redfish User Account. On destroy, it uses the user Account to remove the user(s).

~> Note: The idrac_local_users field cannot have empty value; At least one user is required.

~> Note: For managing (Create/Update/Delete/Change password) a single user at a time, use the resource ‘redfish_user_account’

~> Note: For managing (Create/Update/Delete/Change password) multiple users at a time, use the module ‘user_module’

~> Note: For changing the password of Administrator/root user alone, use the resource ‘user_account_password’

Prerequisites

Name Version
iDRAC >= 9.0
Firmware >= 5.0, <= 7.0
Git

Usage

See examples directory for working examples to reference:

module "users" {

    source = "../../modules/redfish_users"
    
    # idracs and their credentials
    idracs = [
      {
        user = "root"
        password = "passw0rd"
        endpoint = "my-server-1.myawesomecompany.org"
        ssl_insecure = false
      },
      {
        user = "root"
        password = "passw0rd"
        endpoint = "my-server-2.myawesomecompany.org"
        ssl_insecure = false
      },
    ] 

    # local users
    idrac_local_users = [
      {
        name     = "tom"
        password = "T0mPassword123!"
        role_id  = "Operator"
        enabled  = true
      },
      {
        name     = "dick"
        password = "D!ckPassword123!"
        role_id  = "ReadOnly"
        enabled  = true
      },
      {
        user_id  = 12
        name     = "harry"
        password = "H@rryPassword123!"
        role_id  = "ReadOnly"
        enabled  = true
      },
    ]  
}

Examples

Requirements

Name Version
terraform >= 1.5
redfish >= 1.3.0

Providers

Name Version
redfish >= 1.3.0

Modules

No modules.

Resources

Name Type
redfish_user_account.idrac_local_users resource

Inputs

Name Description Type Default Required
idrac_local_users List of users
list(object({
user_id = optional(string)
name = string
password = string
role_id = string
enabled = bool
}))
n/a yes
idracs List of iDRAC credentials.
list(object({
user = string
password = string
endpoint = string
ssl_insecure = bool
}))
n/a yes

Outputs

No outputs.