vault_database_secret_backend_connection

Creates a Database Secret Backend connection in Vault. Database secret backend connections can be used to generate dynamic credentials for the database.

Example Usage

resource "vault_mount" "db" {
  path = "postgres"
  type = "database"
}

resource "vault_database_secret_backend_connection" "postgres" {
  backend       = vault_mount.db.path
  name          = "postgres"
  allowed_roles = ["dev", "prod"]

  postgresql {
    connection_url = "postgres://username:password@host:port/database"
  }
}

Argument Reference

The following arguments are supported:

Exactly one of the nested blocks of configuration options must be supplied.

Cassandra Configuration Options

Couchbase Configuration Options

InfluxDB Configuration Options

Redis Configuration Options

Redis ElastiCache Configuration Options

MongoDB Configuration Options

MongoDB Atlas Configuration Options

SAP HanaDB Configuration Options

MSSQL Configuration Options

MySQL Configuration Options

PostgreSQL Configuration Options

Oracle Configuration Options

Elasticsearch Configuration Options

Snowflake Configuration Options

Redshift Configuration Options

Attributes Reference

No additional attributes are exported by this resource.

Import

Database secret backend connections can be imported using the backend, /config/, and the name e.g.

$ terraform import vault_database_secret_backend_connection.example postgres/config/postgres