# DynamicSecretMongoAtlas

> Resource DynamicSecretMongoAtlas in pulumi-infisical.

<!-- Generated from the pulumi-infisical SDK. -->

Resource DynamicSecretMongoAtlas in pulumi-infisical.

Pulumi type: `infisical:index/dynamicSecretMongoAtlas:DynamicSecretMongoAtlas`.

`name` is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

## Example

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

```ts
import * as infisical from "pulumi-infisical"

const resource = new infisical.DynamicSecretMongoAtlas(
  "dynamicSecretMongoAtlas",
  {
    configuration: {
      adminPublicKey: "<adminPublicKey>",
      groupId: "<groupId>",
      roles: [
        {
          databaseName: "<databaseName>",
          roleName: "<roleName>",
        },
      ],
    },
    defaultTtl: "<defaultTtl>",
    environmentSlug: "<environmentSlug>",
    path: "<path>",
    projectSlug: "<projectSlug>",
  },
)
```

## Arguments

| Property           | Type                                           | Required | Description                                                  |
| ------------------ | ---------------------------------------------- | -------- | ------------------------------------------------------------ |
| `configuration`    | `DynamicSecretMongoAtlasConfiguration (input)` | yes      | The configuration of the dynamic secret                      |
| `defaultTtl`       | `string`                                       | yes      | The default TTL that will be applied for all the leases.     |
| `environmentSlug`  | `string`                                       | yes      | The slug of the environment to create the dynamic secret in. |
| `maxTtl`           | `string`                                       | no       | The maximum limit a TTL can be leased or renewed for.        |
| `metadatas`        | `DynamicSecretMongoAtlasMetadata (input)[]`    | no       | The metadata associated with this dynamic secret             |
| `name`             | `string`                                       | no       | The name of the dynamic secret.                              |
| `path`             | `string`                                       | yes      | The path to create the dynamic secret in.                    |
| `projectSlug`      | `string`                                       | yes      | The slug of the project to create dynamic secret in.         |
| `usernameTemplate` | `string`                                       | no       | The username template of the dynamic secret                  |

## Outputs

Computed outputs are produced by the provider. They are not constructor arguments.

| Property           | Type                                            | Computed | Description                                                  |
| ------------------ | ----------------------------------------------- | -------- | ------------------------------------------------------------ |
| `configuration`    | `DynamicSecretMongoAtlasConfiguration (output)` | no       | The configuration of the dynamic secret                      |
| `defaultTtl`       | `string`                                        | no       | The default TTL that will be applied for all the leases.     |
| `environmentSlug`  | `string`                                        | no       | The slug of the environment to create the dynamic secret in. |
| `maxTtl`           | `string`                                        | no       | The maximum limit a TTL can be leased or renewed for.        |
| `metadatas`        | `DynamicSecretMongoAtlasMetadata (output)[]`    | no       | The metadata associated with this dynamic secret             |
| `name`             | `string`                                        | no       | The name of the dynamic secret.                              |
| `path`             | `string`                                        | no       | The path to create the dynamic secret in.                    |
| `projectSlug`      | `string`                                        | no       | The slug of the project to create dynamic secret in.         |
| `usernameTemplate` | `string`                                        | no       | The username template of the dynamic secret                  |

## `DynamicSecretMongoAtlasConfiguration (input)`

Input object `DynamicSecretMongoAtlasConfiguration`. Fields below belong to this object, not to the parent.

| Property                   | Type                                                  | Required | Description                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------------- | ----------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `adminPrivateKey`          | `string`                                              | no       | Admin user private API key. This value is stored in the Terraform state; use `adminPrivateKeyWo` to keep it out of state. Exactly one of `adminPrivateKey` or `adminPrivateKeyWo` must be set.                                                                                                                                                                                      |
| `adminPrivateKeyWo`        | `string`                                              | no       | **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. Admin user private API key (write-only). This value is never stored in the Terraform state and can accept ephemeral values. Because it is not stored, changes to it are not detected; increment `adminPrivateKeyWoVersion` to push a new value. Requires Terraform 1.11+. |
| `adminPrivateKeyWoVersion` | `number`                                              | no       | The version of the `adminPrivateKeyWo` value. Increment this to trigger an update of the private key.                                                                                                                                                                                                                                                                               |
| `adminPublicKey`           | `string`                                              | yes      | Admin user public API key                                                                                                                                                                                                                                                                                                                                                           |
| `groupId`                  | `string`                                              | yes      | Unique 24-hexadecimal digit string that identifies your project. This is the same as the project ID.                                                                                                                                                                                                                                                                                |
| `roles`                    | `DynamicSecretMongoAtlasConfigurationRole (input)[]`  | yes      |                                                                                                                                                                                                                                                                                                                                                                                     |
| `scopes`                   | `DynamicSecretMongoAtlasConfigurationScope (input)[]` | no       |                                                                                                                                                                                                                                                                                                                                                                                     |

## `DynamicSecretMongoAtlasConfigurationRole (input)`

Input object `DynamicSecretMongoAtlasConfigurationRole`. Fields below belong to this object, not to the parent.

| Property         | Type     | Required | Description                                                                                                                                        |
| ---------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `collectionName` | `string` | no       | Collection on which this role applies.                                                                                                             |
| `databaseName`   | `string` | yes      | Database to which the user is granted access privileges.                                                                                           |
| `roleName`       | `string` | yes      | Human-readable label that identifies a group of privileges assigned to a database user. This value can either be a built-in role or a custom role. |

## `DynamicSecretMongoAtlasConfigurationScope (input)`

Input object `DynamicSecretMongoAtlasConfigurationScope`. Fields below belong to this object, not to the parent.

| Property | Type     | Required | Description                                                                                                     |
| -------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `name`   | `string` | yes      | Human-readable label that identifies the cluster or MongoDB Atlas Data Lake that this database user can access. |
| `type`   | `string` | yes      | Category of resource that this database user can access. Supported options: CLUSTER, DATA_LAKE, STREAM          |

## `DynamicSecretMongoAtlasMetadata (input)`

Input object `DynamicSecretMongoAtlasMetadata`. Fields below belong to this object, not to the parent.

| Property | Type     | Required | Description                      |
| -------- | -------- | -------- | -------------------------------- |
| `key`    | `string` | yes      | The key of the metadata object   |
| `value`  | `string` | yes      | The value of the metadata object |

## `DynamicSecretMongoAtlasConfiguration (output)`

Output object `DynamicSecretMongoAtlasConfiguration`. Fields below belong to this object.

| Property                   | Type                                                   | Always present | Description                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------------- | ------------------------------------------------------ | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `adminPrivateKey`          | `string`                                               | no             | Admin user private API key. This value is stored in the Terraform state; use `adminPrivateKeyWo` to keep it out of state. Exactly one of `adminPrivateKey` or `adminPrivateKeyWo` must be set.                                                                                                                                                                                      |
| `adminPrivateKeyWo`        | `string`                                               | no             | **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. Admin user private API key (write-only). This value is never stored in the Terraform state and can accept ephemeral values. Because it is not stored, changes to it are not detected; increment `adminPrivateKeyWoVersion` to push a new value. Requires Terraform 1.11+. |
| `adminPrivateKeyWoVersion` | `number`                                               | no             | The version of the `adminPrivateKeyWo` value. Increment this to trigger an update of the private key.                                                                                                                                                                                                                                                                               |
| `adminPublicKey`           | `string`                                               | yes            | Admin user public API key                                                                                                                                                                                                                                                                                                                                                           |
| `groupId`                  | `string`                                               | yes            | Unique 24-hexadecimal digit string that identifies your project. This is the same as the project ID.                                                                                                                                                                                                                                                                                |
| `roles`                    | `DynamicSecretMongoAtlasConfigurationRole (output)[]`  | yes            |                                                                                                                                                                                                                                                                                                                                                                                     |
| `scopes`                   | `DynamicSecretMongoAtlasConfigurationScope (output)[]` | yes            |                                                                                                                                                                                                                                                                                                                                                                                     |

## `DynamicSecretMongoAtlasConfigurationRole (output)`

Output object `DynamicSecretMongoAtlasConfigurationRole`. Fields below belong to this object.

| Property         | Type     | Always present | Description                                                                                                                                        |
| ---------------- | -------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `collectionName` | `string` | no             | Collection on which this role applies.                                                                                                             |
| `databaseName`   | `string` | yes            | Database to which the user is granted access privileges.                                                                                           |
| `roleName`       | `string` | yes            | Human-readable label that identifies a group of privileges assigned to a database user. This value can either be a built-in role or a custom role. |

## `DynamicSecretMongoAtlasConfigurationScope (output)`

Output object `DynamicSecretMongoAtlasConfigurationScope`. Fields below belong to this object.

| Property | Type     | Always present | Description                                                                                                     |
| -------- | -------- | -------------- | --------------------------------------------------------------------------------------------------------------- |
| `name`   | `string` | yes            | Human-readable label that identifies the cluster or MongoDB Atlas Data Lake that this database user can access. |
| `type`   | `string` | yes            | Category of resource that this database user can access. Supported options: CLUSTER, DATA_LAKE, STREAM          |

## `DynamicSecretMongoAtlasMetadata (output)`

Output object `DynamicSecretMongoAtlasMetadata`. Fields below belong to this object.

| Property | Type     | Always present | Description                      |
| -------- | -------- | -------------- | -------------------------------- |
| `key`    | `string` | yes            | The key of the metadata object   |
| `value`  | `string` | yes            | The value of the metadata object |
