Data Source: awsRedshiftClusterCredentials
Provides redshift cluster temporary credentials.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsRedshiftClusterCredentials.DataAwsRedshiftClusterCredentials(
this,
"example",
{
clusterIdentifier: "${aws_redshift_cluster.example.cluster_identifier}",
dbUser: "${aws_redshift_cluster.example.master_username}",
}
);
Argument Reference
The following arguments are supported:
autoCreate
- (Optional) Create a database user with the name specified for the user named indbUser
if one does not exist.clusterIdentifier
- (Required) Unique identifier of the cluster that contains the database for which your are requesting credentials.dbName
- (Optional) Name of a database that DbUser is authorized to log on to. IfdbName
is not specified,dbUser
can log on to any existing database.dbUser
- (Required) Name of a database user. If a user name matchingdbUser
exists in the database, the temporary user credentials have the same permissions as the existing user. IfdbUser
doesn't exist in the database andautoCreate
istrue
, a new user is created using the value fordbUser
withpublic
permissions. If a database user matching the value fordbUser
doesn't exist andnot
isfalse
, then the command succeeds but the connection attempt will fail because the user doesn't exist in the database.dbGroups
- (Optional) List of the names of existing database groups that the user named indbUser
will join for the current session, in addition to any group memberships for an existing user. If not specified, a new user is added only topublic
.durationSeconds
- (Optional) The number of seconds until the returned temporary password expires. Valid values are between900
and3600
. Default value is900
.
Attribute Reference
In addition to all arguments above, the following attributes are exported:
dbPassword
- Temporary password that authorizes the user name returned bydbUser
to log on to the databasedbName
.expiration
- Date and time the password indbPassword
expires.