Resource: aws_memorydb_user

Provides a MemoryDB User.

More information about users and ACL-s can be found in the MemoryDB User Guide.

Example Usage

resource "random_password" "example" {
  length = 16
}

resource "aws_memorydb_user" "example" {
  user_name     = "my-user"
  access_string = "on ~* &* +@all"

  authentication_mode {
    type      = "password"
    passwords = [random_password.example.result]
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

authentication_mode Configuration Block

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import a user using the user_name. For example:

import {
  to = aws_memorydb_user.example
  id = "my-user"
}

Using terraform import, import a user using the user_name. For example:

% terraform import aws_memorydb_user.example my-user

The passwords are not available for imported resources, as this information cannot be read back from the MemoryDB API.