Resource: aws_neptune_event_subscription

Example Usage

resource "aws_neptune_cluster" "default" {
  cluster_identifier                  = "neptune-cluster-demo"
  engine                              = "neptune"
  backup_retention_period             = 5
  preferred_backup_window             = "07:00-09:00"
  skip_final_snapshot                 = true
  iam_database_authentication_enabled = "true"
  apply_immediately                   = "true"
}

resource "aws_neptune_cluster_instance" "example" {
  cluster_identifier = aws_neptune_cluster.default.id
  engine             = "neptune"
  instance_class     = "db.r4.large"
  apply_immediately  = "true"
}

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

resource "aws_neptune_event_subscription" "default" {
  name          = "neptune-event-sub"
  sns_topic_arn = aws_sns_topic.default.arn

  source_type = "db-instance"
  source_ids  = [aws_neptune_cluster_instance.example.id]

  event_categories = [
    "maintenance",
    "availability",
    "creation",
    "backup",
    "restoration",
    "recovery",
    "deletion",
    "failover",
    "failure",
    "notification",
    "configuration change",
    "read replica",
  ]

  tags = {
    env = "test"
  }
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

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

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import aws_neptune_event_subscription using the event subscription name. For example:

import {
  to = aws_neptune_event_subscription.example
  id = "my-event-subscription"
}

Using terraform import, import aws_neptune_event_subscription using the event subscription name. For example:

% terraform import aws_neptune_event_subscription.example my-event-subscription