Resource Type: mongodb_user

Defined in:
lib/puppet/type/mongodb_user.rb
Providers:
mongodb

Overview

Manage a MongoDB user. This includes management of users password as well as privileges.

Properties

  • database

    The user’s target database.

    Supported values:
    • %r{^[\w-]+$}
  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent
  • password

    The plaintext password of the user.

  • password_hash

    The password hash of the user. Use mongodb_password() for creating hash. Only available on MongoDB 3.0 and later. SCRAM-SHA-256 authentication mechanism is not supported.

    Supported values:
    • %r{^\w+$}
  • roles (defaults to: ['dbAdmin'])

    The user’s roles.

    Supported values:
    • %r{^\w+(@\w+)?$}
  • scram_credentials

    The SCRAM-SHA-1 credentials of a user. These are read only and change when password or password_hash changes.

  • username

    The name of the user.

Parameters

  • auth_mechanism (defaults to: scram_sha_1)

    Authentication mechanism. Password verification is not supported with SCRAM-SHA-256.

    Supported values:
    • scram_sha_256
    • scram_sha_1
  • name (namevar)

    The name of the resource.

  • provider

    The specific backend to use for this ‘mongodb_user` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • tries (defaults to: 10)

    The maximum amount of two second tries to wait MongoDB startup.

    Supported values:
    • %r{^\d+$}
  • update_password (defaults to: false)

    Update password. Used with SCRAM-SHA-256 because password verification is not supported.