The MongoDB Atlas Secrets Engine generates Programmatic API keys for MongoDB Atlas. This allows one to manage the lifecycle of these MongoDB Atlas secrets through Vault. The created MongoDB Atlas secrets are
time-based and are automatically revoked when the Vault lease expires, unless renewed. Vault will create a Programmatic API key for each lease scoped to the MongoDB Atlas project or organization denoted with the included role(s). An IP Whitelist may also be configured for the Programmatic API key with desired IPs and/or CIDR blocks.
The MongoDB Atlas Programmatic API Key Public and
Private Key is returned to the caller. To learn more about Programmatic API Keys visit the Programmatic API Keys Doc.
Programmatic API Key credential types create a Vault role to generate a Programmatic API Key at
either the MongoDB Atlas Organization or Project level with the designated role(s) for programmatic access. If a role with the name does not exist, it will be created. If the role exists, it will be updated with the new attributes.
name(string <required>) - Unique identifier name of the role name
project_id(string <required>) - Unique identifier for the organization to which the target API Key belongs. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
roles(list [string] <required>) - List of roles that the API Key needs to have. If the roles array is provided:
IMPORTANT: Provide at least one role. Make sure all roles must be valid for the Organization or Project.
NOTE: Include all roles that you want this API Key to have. Any roles not in this array are removed.
ip_addresses(list [string] <Optional>) - IP address to be added to the whitelist for the API key. This field is mutually exclusive with the cidrBlock field.
cidr_blocks(list [string] <Optional>) - Whitelist entry in CIDR notation to be added for the API key. This field is mutually exclusive with the ipAddress field.