Skip to content

Commit

Permalink
Merge pull request #1110 from davecrumbacher/d-improve-awscc_timestre…
Browse files Browse the repository at this point in the history
…am_database

docs: add example for awscc_timestream_database
  • Loading branch information
marcosentino authored Aug 9, 2023
2 parents 3d62578 + 2c25d9f commit 61919c1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
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 }}

0 comments on commit 61919c1

Please sign in to comment.