Resource

dcloud_iam_user_login_profile

A console password for an IAM user (type user): they sign in at sign_in_url with their user name and this password, no email account of their own. Set password, or generate_password = true and read generated_password (kept in state: protect the state). Import with the IAM user id.

Example Usage

resource "dcloud_iam_user" "dana" {
  username     = "dana"
  display_name = "Dana (contractor)"
}

resource "dcloud_iam_user_login_profile" "dana" {
  user_id           = dcloud_iam_user.dana.id
  generate_password = true
  # Dana chooses their own password at the first sign-in.
  password_reset_required = true
}

output "dana_sign_in" {
  value = dcloud_iam_user_login_profile.dana.sign_in_url
}

output "dana_first_password" {
  value     = dcloud_iam_user_login_profile.dana.generated_password
  sensitive = true
}

Schema

Required

  • user_id (String) The id of the parent resource ({id} in the path). Changing it replaces the resource.

Optional

  • enabled (Boolean) false turns console sign-in off (sessions end at once) and keeps the password.
  • generate_password (Boolean) Let the platform make a password that meets the policy; it is in generated_password. Changing it replaces the resource.
  • password (String, Sensitive) The password, checked against the organization's password policy. Changing it resets the password and ends the user's sessions. Never returned by the API: not read back, and empty after an import.
  • password_reset_required (Boolean) The user picks their own password at the first sign-in. Default: true. Applies when a password is set. Never returned by the API: not read back, and empty after an import.

Read-Only

  • generated_password (String, Sensitive) The generated password, from create. Empty after an import or when password is set.
  • id (String) The resource's id.
  • last_sign_in_at (String) The last successful console sign-in.
  • locked_until (String) Set while the user is locked out after too many wrong passwords.
  • sign_in_url (String) The organization's sign-in page for IAM users.
  • username (String) The user name to sign in with.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import dcloud_iam_user_login_profile.dana <iam-user-id>

Generated from the provider's schema.