Skip to content

Commit

Permalink
Adding documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
yardensachs authored and anGie44 committed May 7, 2021
1 parent c62c396 commit cacd6ff
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions website/docs/r/timestreamwrite_database.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
subcategory: "TimestreamWrite"
layout: "aws"
page_title: "AWS: aws_timestreamwrite_database"
description: |-
Provides a Timestream database resource.
---

# Resource: aws_timestreamwrite_database

Provides a Timestream database resource.

## Example Usage

### Basic usage

```hcl
resource "aws_timestreamwrite_database" "test_database" {
database_name = "database-example"
}
```

### Full usage

```hcl
resource "aws_timestreamwrite_database" "test_database" {
database_name = "database-example"
kms_key_id = aws_kms_key.foo.arn
tags = {
Name = "value"
}
}
```

## Argument Reference

The following arguments are supported:

* `database_name` – (Required) The name of the Timestream database. Minimum length of 3. Maximum length of 64.

* `kms_key_id` - (Optional) The KMS key for the database. You can specify a key ID using any of the following:
* Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
* Key ARN: `arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
* Alias name: `alias/ExampleAlias`
* Alias ARN: `arn:aws:kms:us-east-1:111122223333:alias/ExampleAlias`
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](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) for more info.

* `tags` - (Optional) A map of tags to assign to the resource


## Attributes Reference

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

* `arn` - The Amazon Resource Name that uniquely identifies this database.

* `kms_key_id` - The identifier of the KMS key used to encrypt the data stored in the database.

## Import

Timestream databases can be imported using the `database_name`, e.g.

```
$ terraform import aws_timestreamwrite_database.my_database my_database
```

0 comments on commit cacd6ff

Please sign in to comment.