# DynamicSecretMongoDb

> Resource DynamicSecretMongoDb in pulumi-infisical.

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

Resource DynamicSecretMongoDb in pulumi-infisical.

Pulumi type: `infisical:index/dynamicSecretMongoDb:DynamicSecretMongoDb`.

`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.DynamicSecretMongoDb("dynamicSecretMongoDb", {
  configuration: {
    database: "<database>",
    host: "<host>",
    password: "<password>",
    roles: ["<roles>"],
    username: "<username>",
  },
  defaultTtl: "<defaultTtl>",
  environmentSlug: "<environmentSlug>",
  path: "<path>",
  projectSlug: "<projectSlug>",
})
```

## Arguments

| Property           | Type                                        | Required | Description                                                  |
| ------------------ | ------------------------------------------- | -------- | ------------------------------------------------------------ |
| `configuration`    | `DynamicSecretMongoDbConfiguration (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`        | `DynamicSecretMongoDbMetadata (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`    | `DynamicSecretMongoDbConfiguration (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`        | `DynamicSecretMongoDbMetadata (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                  |

## `DynamicSecretMongoDbConfiguration (input)`

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

| Property   | Type       | Required | Description                                                                                  |
| ---------- | ---------- | -------- | -------------------------------------------------------------------------------------------- |
| `ca`       | `string`   | no       | The CA certificate to use to connect to the database.                                        |
| `database` | `string`   | yes      | The name of the database to use.                                                             |
| `host`     | `string`   | yes      | The host of the database server.                                                             |
| `password` | `string`   | yes      | The password to use to connect to the database.                                              |
| `port`     | `number`   | no       | The port of the database server.                                                             |
| `roles`    | `string[]` | yes      | A list of role names to assign to the user. The role names can either be built-in or custom. |
| `username` | `string`   | yes      | The username to use to connect to the database.                                              |

## `DynamicSecretMongoDbMetadata (input)`

Input object `DynamicSecretMongoDbMetadata`. 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 |

## `DynamicSecretMongoDbConfiguration (output)`

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

| Property   | Type       | Always present | Description                                                                                  |
| ---------- | ---------- | -------------- | -------------------------------------------------------------------------------------------- |
| `ca`       | `string`   | no             | The CA certificate to use to connect to the database.                                        |
| `database` | `string`   | yes            | The name of the database to use.                                                             |
| `host`     | `string`   | yes            | The host of the database server.                                                             |
| `password` | `string`   | yes            | The password to use to connect to the database.                                              |
| `port`     | `number`   | no             | The port of the database server.                                                             |
| `roles`    | `string[]` | yes            | A list of role names to assign to the user. The role names can either be built-in or custom. |
| `username` | `string`   | yes            | The username to use to connect to the database.                                              |

## `DynamicSecretMongoDbMetadata (output)`

Output object `DynamicSecretMongoDbMetadata`. 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 |
