Skip to content

Resource: awsTimestreamwriteDatabase

Provides a Timestream database resource.

Example Usage

Basic 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.timestreamwriteDatabase.TimestreamwriteDatabase(this, "example", {
  databaseName: "database-example",
});

Full 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.timestreamwriteDatabase.TimestreamwriteDatabase(this, "example", {
  databaseName: "database-example",
  kmsKeyId: "${aws_kms_key.example.arn}",
  tags: {
    Name: "value",
  },
});

Argument Reference

The following arguments are supported:

  • databaseName – (Required) The name of the Timestream database. Minimum length of 3. Maximum length of 64.
  • kmsKeyId - (Optional) The ARN (not Alias ARN) of the KMS key to be used to encrypt the data stored in the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
  • tags - (Optional) Map of tags to assign to this resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The name of the Timestream database.
  • arn - The ARN that uniquely identifies this database.
  • kmsKeyId - The ARN of the KMS key used to encrypt the data stored in the database.
  • tableCount - The total number of tables found within the Timestream database.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

Timestream databases can be imported using the databaseName, e.g.,

$ terraform import aws_timestreamwrite_database.example example