Resource
dcloud_db_login
A login (Postgres role) on a managed database. Its password is generated and filed in Secrets (secret_id).
Example Usage
resource "dcloud_db_login" "reporting" {
db_instance_id = dcloud_db_instance.main.id
name = "reporting"
access = "read"
valid_until = "2027-06-30T00:00:00Z"
}Schema
Required
db_instance_id(String) The id of the parent resource ({id}in the path). Changing it replaces the resource.name(String) The Postgres role name: a-z, 0-9, _. Up to 63 characters. Changing it replaces the resource.
Optional
access(String) read: SELECT on all data (pg_read_all_data); readwrite: also writes (pg_write_all_data); read when omitted. Defaultread. One of:read,readwrite. Changing it replaces the resource.for_iam_user_id(String) IAM user the login is for, shown with it; omitted: nobody in particular. A UUID. Changing it replaces the resource.valid_until(String) Expiry (VALID UNTIL), 5 minutes to 2 years ahead; omitted is no expiry. An RFC 3339 timestamp.
Read-Only
id(String) The resource's id.secret_id(String) The secret holding the login's password.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import dcloud_db_login.reporting <db-instance-id>/<login-id>Generated from the provider's schema.
Related