Resource: aws_redshift_logging

Terraform resource for managing an AWS Redshift Logging configuration.

Example Usage

Basic Usage

resource "aws_redshift_logging" "example" {
  cluster_identifier   = aws_redshift_cluster.example.id
  log_destination_type = "cloudwatch"
  log_exports          = ["connectionlog", "userlog"]
}

S3 Destination Type

resource "aws_redshift_logging" "example" {
  cluster_identifier   = aws_redshift_cluster.example.id
  log_destination_type = "s3"
  bucket_name          = aws_s3_bucket.example.id
  s3_key_prefix        = "example-prefix/"
}

Argument Reference

The following arguments are required:

The following arguments are optional:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Redshift Logging using the id. For example:

import {
  to = aws_redshift_logging.example
  id = "cluster-id-12345678"
}

Using terraform import, import Redshift Logging using the id. For example:

% terraform import aws_redshift_logging.example cluster-id-12345678