Resource: aws_redshift_event_subscription

Provides a Redshift event subscription resource.

Example Usage

resource "aws_redshift_cluster" "default" {
  cluster_identifier = "default"
  database_name      = "default"

  # ...
}

resource "aws_sns_topic" "default" {
  name = "redshift-events"
}

resource "aws_redshift_event_subscription" "default" {
  name          = "redshift-event-sub"
  sns_topic_arn = aws_sns_topic.default.arn

  source_type = "cluster"
  source_ids  = [aws_redshift_cluster.default.id]

  severity = "INFO"

  event_categories = [
    "configuration",
    "management",
    "monitoring",
    "security",
  ]

  tags = {
    Name = "default"
  }
}

Argument Reference

This resource supports the following arguments:

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 Event Subscriptions using the name. For example:

import {
  to = aws_redshift_event_subscription.default
  id = "redshift-event-sub"
}

Using terraform import, import Redshift Event Subscriptions using the name. For example:

% terraform import aws_redshift_event_subscription.default redshift-event-sub