mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Add documentation
This commit is contained in:
parent
7a55fe4bcc
commit
a08fbcbadb
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
layout: "aws"
|
||||||
|
page_title: "AWS: aws_cloudwatch_log_destination"
|
||||||
|
sidebar_current: "docs-aws-resource-cloudwatch-log-destination"
|
||||||
|
description: |-
|
||||||
|
Provides a CloudWatch Logs destination.
|
||||||
|
---
|
||||||
|
|
||||||
|
# aws\_cloudwatch\_log\_destination
|
||||||
|
|
||||||
|
Provides a CloudWatch Logs destination resource.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
resource "aws_cloudwatch_log_destination" "test_destination" {
|
||||||
|
name = "test_destination"
|
||||||
|
role_arn = "${aws_iam_role.iam_for_cloudwatch.arn}"
|
||||||
|
target_arn = "${aws_kinesis_stream.kinesis_for_cloudwatch.arn}"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `name` - (Required) A name for the log destination
|
||||||
|
* `role_arn` - (Required) The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to put data into the target
|
||||||
|
* `target_arn` - (Required) The ARN of the target Amazon Kinesis stream or Amazon Lambda resource for the destination
|
||||||
|
|
||||||
|
## Attributes Reference
|
||||||
|
|
||||||
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `arn` - The Amazon Resource Name (ARN) specifying the log destination.
|
@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
layout: "aws"
|
||||||
|
page_title: "AWS: aws_cloudwatch_log_destination_policy"
|
||||||
|
sidebar_current: "docs-aws-resource-cloudwatch-log-destination-policy"
|
||||||
|
description: |-
|
||||||
|
Provides a CloudWatch Logs destination policy.
|
||||||
|
---
|
||||||
|
|
||||||
|
# aws\_cloudwatch\_log\_destination\_policy
|
||||||
|
|
||||||
|
Provides a CloudWatch Logs destination policy resource.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
resource "aws_cloudwatch_log_destination" "test_destination" {
|
||||||
|
name = "test_destination"
|
||||||
|
role_arn = "${aws_iam_role.iam_for_cloudwatch.arn}"
|
||||||
|
target_arn = "${aws_kinesis_stream.kinesis_for_cloudwatch.arn}"
|
||||||
|
}
|
||||||
|
|
||||||
|
data "aws_iam_policy_document" "test_destination_policy" {
|
||||||
|
statement {
|
||||||
|
effect = "Allow"
|
||||||
|
|
||||||
|
principals = {
|
||||||
|
type = "AWS"
|
||||||
|
|
||||||
|
identifiers = [
|
||||||
|
"123456789012",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
actions = [
|
||||||
|
"logs:PutSubscriptionFilter",
|
||||||
|
]
|
||||||
|
|
||||||
|
resources = [
|
||||||
|
"${aws_cloudwatch_log_destination.test_destination.arn}",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "aws_cloudwatch_log_destination_policy" "test_destination_policy" {
|
||||||
|
destination_name = "${aws_cloudwatch_log_destination.test_destination.name}"
|
||||||
|
access_policy = "${data.aws_iam_policy_document.test_destination_policy.json}"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `destination_name` - (Required) A name for the subscription filter
|
||||||
|
* `access_policy` - (Required) The policy document. This is a JSON formatted string.
|
Loading…
Reference in New Issue
Block a user