Provides a CloudWatch Log Stream resource.
resource "aws_cloudwatch_log_group" "yada" {
name = "Yada"
}
resource "aws_cloudwatch_log_stream" "foo" {
name = "SampleLogStream1234"
log_group_name = aws_cloudwatch_log_group.yada.name
}
This resource supports the following arguments:
name
- (Required) The name of the log stream. Must not be longer than 512 characters and must not contain :
log_group_name
- (Required) The name of the log group under which the log stream is to be created.This resource exports the following attributes in addition to the arguments above:
arn
- The Amazon Resource Name (ARN) specifying the log stream.In Terraform v1.5.0 and later, use an import
block to import Cloudwatch Log Stream using the stream's log_group_name
and name
. For example:
import {
to = aws_cloudwatch_log_stream.foo
id = "Yada:SampleLogStream1234"
}
Using terraform import
, import Cloudwatch Log Stream using the stream's log_group_name
and name
. For example:
% terraform import aws_cloudwatch_log_stream.foo Yada:SampleLogStream1234