Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add example for awscc_timestream_database #1110

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions docs/resources/timestream_database.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_timestream_database Resource - terraform-provider-awscc"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,24 @@ description: |-

The AWS::Timestream::Database resource creates a Timestream database.


## Example Usage

### Create Database
Create a Timestream database
```terraform
resource "aws_kms_key" "this" {
description = "Timestream KMS Key"
}

resource "awscc_timestream_database" "this" {
database_name = "MyTimestreamDB"
kms_key_id = aws_kms_key.this.key_id
tags = [{
key = "Managed By"
value = "AWSCC"
}]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
12 changes: 12 additions & 0 deletions examples/resources/awscc_timestream_database/database.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resource "aws_kms_key" "this" {
description = "Timestream KMS Key"
}

resource "awscc_timestream_database" "this" {
database_name = "MyTimestreamDB"
kms_key_id = aws_kms_key.this.key_id
tags = [{
key = "Managed By"
value = "AWSCC"
}]
}
27 changes: 27 additions & 0 deletions templates/resources/timestream_database.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

## Example Usage

### Create Database
Create a Timestream database
{{ tffile (printf "examples/resources/%s/database.tf" .Name)}}

{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}