Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ma91n/hclwrite-dynamodb
PoC hclwrite package
https://github.com/ma91n/hclwrite-dynamodb
Last synced: 6 days ago
JSON representation
PoC hclwrite package
- Host: GitHub
- URL: https://github.com/ma91n/hclwrite-dynamodb
- Owner: ma91n
- License: mit
- Created: 2024-03-12T00:23:49.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-12T07:07:42.000Z (8 months ago)
- Last Synced: 2024-06-19T21:26:36.218Z (5 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hclwrite-dynamodb
PoC hclwrite package
Terraform連載2024 技術ブログ記事に用いたサンプルコード。
## Example
```sh
$ go run . example/dynamodb_table.tf
// DO NOT EDIT, MADE BY hclwrite-dynamodb-generatorresource "aws_cloudwatch_metric_alarm" "dynamodb_throttledrequests_myproduct_read" {
alarm_name = "${aws_dynamodb_table.myproduct_read.name}-throttledrequests"
comparison_operator = "GreaterThanOrEqualToThreshold"
datapoints_to_alarm = "1"
evaluation_periods = "1"
metric_name = "ThrottledRequests"
namespace = "AWS/DynamoDB"
period = "60"
statistic = "Maximum"
threshold = "1"
alarm_actions = aws_sns_topic.myproduct_alert.arn
dimensions {
TableName = aws_dynamodb_table.myproduct_read.name
}
}resource "aws_cloudwatch_metric_alarm" "dynamodb_throttledrequests_myproduct_content" {
alarm_name = "${aws_dynamodb_table.myproduct_read.name}-throttledrequests"
comparison_operator = "GreaterThanOrEqualToThreshold"
datapoints_to_alarm = "1"
evaluation_periods = "1"
metric_name = "ThrottledRequests"
namespace = "AWS/DynamoDB"
period = "60"
statistic = "Maximum"
threshold = "1"
alarm_actions = aws_sns_topic.myproduct_alert.arn
dimensions {
TableName = aws_dynamodb_table.myproduct_read.name
}
}
```