Resource: awsIvschatLoggingConfiguration
Terraform resource for managing an AWS IVS (Interactive Video) Chat Logging Configuration.
Example Usage
Basic Usage - Logging to CloudWatch
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsCloudwatchLogGroupExample =
new aws.cloudwatchLogGroup.CloudwatchLogGroup(this, "example", {});
const awsIvschatLoggingConfigurationExample =
new aws.ivschatLoggingConfiguration.IvschatLoggingConfiguration(
this,
"example_1",
{
destinationConfiguration: {
cloudwatchLogs: {
logGroupName: awsCloudwatchLogGroupExample.name,
},
},
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsIvschatLoggingConfigurationExample.overrideLogicalId("example");
Basic Usage - Logging to Kinesis Firehose with Extended S3
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsS3BucketExample = new aws.s3Bucket.S3Bucket(this, "example", {
bucketPrefix: "tf-ivschat-logging-bucket",
});
const awsS3BucketAclExample = new aws.s3BucketAcl.S3BucketAcl(
this,
"example_1",
{
acl: "private",
bucket: awsS3BucketExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsS3BucketAclExample.overrideLogicalId("example");
const dataAwsIamPolicyDocumentAssumeRole =
new aws.dataAwsIamPolicyDocument.DataAwsIamPolicyDocument(
this,
"assume_role",
{
statement: [
{
actions: ["sts:AssumeRole"],
effect: "Allow",
principals: [
{
identifiers: ["firehose.amazonaws.com"],
type: "Service",
},
],
},
],
}
);
const awsIamRoleExample = new aws.iamRole.IamRole(this, "example_3", {
assumeRolePolicy: dataAwsIamPolicyDocumentAssumeRole.json,
name: "firehose_example_role",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsIamRoleExample.overrideLogicalId("example");
const awsKinesisFirehoseDeliveryStreamExample =
new aws.kinesisFirehoseDeliveryStream.KinesisFirehoseDeliveryStream(
this,
"example_4",
{
destination: "extended_s3",
extendedS3Configuration: {
bucketArn: awsS3BucketExample.arn,
roleArn: awsIamRoleExample.arn,
},
name: "terraform-kinesis-firehose-extended-s3-example-stream",
tags: {
LogDeliveryEnabled: "true",
},
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsKinesisFirehoseDeliveryStreamExample.overrideLogicalId("example");
const awsIvschatLoggingConfigurationExample =
new aws.ivschatLoggingConfiguration.IvschatLoggingConfiguration(
this,
"example_5",
{
destinationConfiguration: {
firehose: {
deliveryStreamName: awsKinesisFirehoseDeliveryStreamExample.name,
},
},
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsIvschatLoggingConfigurationExample.overrideLogicalId("example");
Basic Usage - Logging to S3
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsS3BucketExample = new aws.s3Bucket.S3Bucket(this, "example", {
bucket_name: "tf-ivschat-logging",
forceDestroy: true,
});
const awsIvschatLoggingConfigurationExample =
new aws.ivschatLoggingConfiguration.IvschatLoggingConfiguration(
this,
"example_1",
{
destinationConfiguration: {
s3: {
bucketName: awsS3BucketExample.id,
},
},
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsIvschatLoggingConfigurationExample.overrideLogicalId("example");
Argument Reference
The following arguments are required:
destinationConfiguration
- (Required) Object containing destination configuration for where chat activity will be logged. This object must contain exactly one of the following children arguments:cloudwatchLogs
- An Amazon CloudWatch Logs destination configuration where chat activity will be logged.logGroupName
- Name of the Amazon Cloudwatch Logs destination where chat activity will be logged.
firehose
- An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged.deliveryStreamName
- Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.
s3
- An Amazon S3 destination configuration where chat activity will be logged.bucketName
- Name of the Amazon S3 bucket where chat activity will be logged.
The following arguments are optional:
name
- (Optional) Logging Configuration name.tags
- (Optional) A map of tags to assign to the resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- ARN of the Logging Configuration.id
- ID of the Logging Configuration.state
- State of the Logging Configuration.tagsAll
- Map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Timeouts
create
- (Default5M
)update
- (Default5M
)delete
- (Default5M
)
Import
IVS (Interactive Video) Chat Logging Configuration can be imported using the ARN, e.g.,