# DynamicSecretSqlDatabase

> Resource DynamicSecretSqlDatabase in pulumi-infisical.

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

Resource DynamicSecretSqlDatabase in pulumi-infisical.

Pulumi type: `infisical:index/dynamicSecretSqlDatabase:DynamicSecretSqlDatabase`.

`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.DynamicSecretSqlDatabase(
  "dynamicSecretSqlDatabase",
  {
    configuration: {
      client: "<client>",
      creationStatement: "<creationStatement>",
      database: "<database>",
      host: "<host>",
      port: 0,
      revocationStatement: "<revocationStatement>",
      username: "<username>",
    },
    defaultTtl: "<defaultTtl>",
    environmentSlug: "<environmentSlug>",
    path: "<path>",
    projectSlug: "<projectSlug>",
  },
)
```

## Arguments

| Property           | Type                                            | Required | Description                                                  |
| ------------------ | ----------------------------------------------- | -------- | ------------------------------------------------------------ |
| `configuration`    | `DynamicSecretSqlDatabaseConfiguration (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`        | `DynamicSecretSqlDatabaseMetadata (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`    | `DynamicSecretSqlDatabaseConfiguration (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`        | `DynamicSecretSqlDatabaseMetadata (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                  |

## `DynamicSecretSqlDatabaseConfiguration (input)`

Input object `DynamicSecretSqlDatabaseConfiguration`. 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.                                                                                                                                                                                                                                                                                                                                            |
| `client`               | `string`                                                            | yes      | The database client to use. Currently supported values are postgres, mysql2, oracledb, mssql, sap-ase, and vertica.                                                                                                                                                                                                                                                                              |
| `creationStatement`    | `string`                                                            | yes      | The creation statement to use to create the dynamic secret lease.                                                                                                                                                                                                                                                                                                                                |
| `database`             | `string`                                                            | yes      | The name of the database to use.                                                                                                                                                                                                                                                                                                                                                                 |
| `gatewayId`            | `string`                                                            | no       | The Gateway ID to use to connect to the database.                                                                                                                                                                                                                                                                                                                                                |
| `host`                 | `string`                                                            | yes      | The host of the database server.                                                                                                                                                                                                                                                                                                                                                                 |
| `password`             | `string`                                                            | no       | The password to use to connect to the database. This value is stored in the Terraform state; use `passwordWo` to keep it out of state. Exactly one of password or `passwordWo` must be set.                                                                                                                                                                                                      |
| `passwordRequirements` | `DynamicSecretSqlDatabaseConfigurationPasswordRequirements (input)` | no       | The password requirements to use to create the dynamic secret lease.                                                                                                                                                                                                                                                                                                                             |
| `passwordWo`           | `string`                                                            | no       | **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. The password to use to connect to the database (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 `passwordWoVersion` to push a new value. Requires Terraform 1.11+. |
| `passwordWoVersion`    | `number`                                                            | no       | The version of the `passwordWo` value. Increment this to trigger an update of the password.                                                                                                                                                                                                                                                                                                      |
| `port`                 | `number`                                                            | yes      | The port of the database server.                                                                                                                                                                                                                                                                                                                                                                 |
| `renewStatement`       | `string`                                                            | no       | The renew statement to use to renew the dynamic secret lease.                                                                                                                                                                                                                                                                                                                                    |
| `revocationStatement`  | `string`                                                            | yes      | The revocation statement to use to revoke the dynamic secret lease.                                                                                                                                                                                                                                                                                                                              |
| `username`             | `string`                                                            | yes      | The username to use to connect to the database.                                                                                                                                                                                                                                                                                                                                                  |

## `DynamicSecretSqlDatabaseConfigurationPasswordRequirements (input)`

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

| Property         | Type                                                                        | Required | Description                                                           |
| ---------------- | --------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------- |
| `allowedSymbols` | `string`                                                                    | no       | The symbols allowed in the password.                                  |
| `length`         | `number`                                                                    | yes      | The length of the password to use to create the dynamic secret lease. |
| `required`       | `DynamicSecretSqlDatabaseConfigurationPasswordRequirementsRequired (input)` | yes      | The required characters to use to create the dynamic secret lease.    |

## `DynamicSecretSqlDatabaseConfigurationPasswordRequirementsRequired (input)`

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

| Property    | Type     | Required | Description                                                  |
| ----------- | -------- | -------- | ------------------------------------------------------------ |
| `digits`    | `number` | yes      | The number of digits required in the password.               |
| `lowercase` | `number` | yes      | The number of lowercase characters required in the password. |
| `symbols`   | `number` | yes      | The number of symbols required in the password.              |
| `uppercase` | `number` | yes      | The number of uppercase characters required in the password. |

## `DynamicSecretSqlDatabaseMetadata (input)`

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

## `DynamicSecretSqlDatabaseConfiguration (output)`

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

| Property               | Type                                                                 | Always present | Description                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------- | -------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ca`                   | `string`                                                             | no             | The CA certificate to use to connect to the database.                                                                                                                                                                                                                                                                                                                                            |
| `client`               | `string`                                                             | yes            | The database client to use. Currently supported values are postgres, mysql2, oracledb, mssql, sap-ase, and vertica.                                                                                                                                                                                                                                                                              |
| `creationStatement`    | `string`                                                             | yes            | The creation statement to use to create the dynamic secret lease.                                                                                                                                                                                                                                                                                                                                |
| `database`             | `string`                                                             | yes            | The name of the database to use.                                                                                                                                                                                                                                                                                                                                                                 |
| `gatewayId`            | `string`                                                             | no             | The Gateway ID to use to connect to the database.                                                                                                                                                                                                                                                                                                                                                |
| `host`                 | `string`                                                             | yes            | The host of the database server.                                                                                                                                                                                                                                                                                                                                                                 |
| `password`             | `string`                                                             | no             | The password to use to connect to the database. This value is stored in the Terraform state; use `passwordWo` to keep it out of state. Exactly one of password or `passwordWo` must be set.                                                                                                                                                                                                      |
| `passwordRequirements` | `DynamicSecretSqlDatabaseConfigurationPasswordRequirements (output)` | no             | The password requirements to use to create the dynamic secret lease.                                                                                                                                                                                                                                                                                                                             |
| `passwordWo`           | `string`                                                             | no             | **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. The password to use to connect to the database (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 `passwordWoVersion` to push a new value. Requires Terraform 1.11+. |
| `passwordWoVersion`    | `number`                                                             | no             | The version of the `passwordWo` value. Increment this to trigger an update of the password.                                                                                                                                                                                                                                                                                                      |
| `port`                 | `number`                                                             | yes            | The port of the database server.                                                                                                                                                                                                                                                                                                                                                                 |
| `renewStatement`       | `string`                                                             | no             | The renew statement to use to renew the dynamic secret lease.                                                                                                                                                                                                                                                                                                                                    |
| `revocationStatement`  | `string`                                                             | yes            | The revocation statement to use to revoke the dynamic secret lease.                                                                                                                                                                                                                                                                                                                              |
| `username`             | `string`                                                             | yes            | The username to use to connect to the database.                                                                                                                                                                                                                                                                                                                                                  |

## `DynamicSecretSqlDatabaseConfigurationPasswordRequirements (output)`

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

| Property         | Type                                                                         | Always present | Description                                                           |
| ---------------- | ---------------------------------------------------------------------------- | -------------- | --------------------------------------------------------------------- |
| `allowedSymbols` | `string`                                                                     | no             | The symbols allowed in the password.                                  |
| `length`         | `number`                                                                     | yes            | The length of the password to use to create the dynamic secret lease. |
| `required`       | `DynamicSecretSqlDatabaseConfigurationPasswordRequirementsRequired (output)` | yes            | The required characters to use to create the dynamic secret lease.    |

## `DynamicSecretSqlDatabaseConfigurationPasswordRequirementsRequired (output)`

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

| Property    | Type     | Always present | Description                                                  |
| ----------- | -------- | -------------- | ------------------------------------------------------------ |
| `digits`    | `number` | yes            | The number of digits required in the password.               |
| `lowercase` | `number` | yes            | The number of lowercase characters required in the password. |
| `symbols`   | `number` | yes            | The number of symbols required in the password.              |
| `uppercase` | `number` | yes            | The number of uppercase characters required in the password. |

## `DynamicSecretSqlDatabaseMetadata (output)`

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