AWS IAM User Login Profile

This page shows how to write Terraform and CloudFormation for IAM User Login Profile and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (aws_iam_user_login_profile)

Manages an IAM User Login Profile with limited support for password creation during Terraform resource creation. Uses PGP to encrypt the password for safe transport to the user. PGP keys can be obtained from Keybase. -> To reset an IAM User login password via Terraform, you can use the terraform taint command or change any of the arguments.

Parameters

Example Usage (from GitHub)

github-iconakshay0990/terraform-tasks
resource "aws_iam_user_login_profile" "terraform_user1" {
  user    = aws_iam_user.terraform_user1.name
  pgp_key = "keybase:test"
}

resource "aws_iam_user_login_profile" "terraform_user2" {
github-iconleonidweinbergcx/mykics
resource "aws_iam_user_login_profile" "positive2" {
  user    = aws_iam_user.example.name
  pgp_key = "keybase:some_person_that_exists"

  password_reset_required = false

github-iconARIG-Robotique/terraform-aws-env
resource "aws_iam_user_login_profile" "gregory" {
  user    = aws_iam_user.gregory.name
  pgp_key = local.iam_pgp_key
}

// Damien
github-iconCheckmarx/kics
resource "aws_iam_user_login_profile" "positive2" {
  user    = aws_iam_user.example.name
  pgp_key = "keybase:some_person_that_exists"

  password_reset_required = false

github-iconMaximilianarius/Terraform_create_password_iam_user
resource "aws_iam_user_login_profile" "Monitor1" {
  user            = "Monitor1"
  pgp_key         = "keybase:maximfloreagmail" #Keybase:example --example means the account name of the user with the pgp key
  password_length = 10
}
resource "aws_iam_user_login_profile" "Monitor2" {

CloudFormation Example (AWS::IAM::User LoginProfile)

Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console. For more information about managing passwords, see Managing Passwords in the IAM User Guide.

Parameters

Password The user's password.
Required: Yes
Type: String
Update requires: No interruption

PasswordResetRequired Specifies whether the user is required to set a new password on next sign-in.
Required: No
Type: Boolean
Update requires: No interruption

Frequently asked questions

What is AWS IAM User Login Profile?

AWS IAM User Login Profile is a resource for IAM of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS IAM User Login Profile?

For Terraform, the akshay0990/terraform-tasks, leonidweinbergcx/mykics and ARIG-Robotique/terraform-aws-env source code examples are useful. See the Terraform Example section for further details.