Resource: aws_neptune_cluster

Provides an Neptune Cluster Resource. A Cluster Resource defines attributes that are applied to the entire cluster of Neptune Cluster Instances.

Changes to a Neptune Cluster can occur when you manually change a parameter, such as backup_retention_period, and are reflected in the next maintenance window. Because of this, Terraform may report a difference in its planning phase because a modification has not yet taken place. You can use the apply_immediately flag to instruct the service to apply the change immediately (see documentation below).

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
}

Argument Reference

This resource supports the following arguments:

Serverless

Neptune serverless has some limitations. Please see the limitations on the AWS documentation before jumping into Neptune Serverless.

Neptune serverless requires that the engine_version attribute must be 1.2.0.1 or above. Also, you need to provide a cluster parameter group compatible with the family neptune1.2. In the example below, the default cluster parameter group is used.

resource "aws_neptune_cluster" "example" {
  cluster_identifier                   = "neptune-cluster-development"
  engine                               = "neptune"
  engine_version                       = "1.2.0.1"
  neptune_cluster_parameter_group_name = "default.neptune1.2"
  skip_final_snapshot                  = true
  apply_immediately                    = true

  serverless_v2_scaling_configuration {}
}

resource "aws_neptune_cluster_instance" "example" {
  cluster_identifier           = aws_neptune_cluster.example.cluster_identifier
  instance_class               = "db.serverless"
  neptune_parameter_group_name = "default.neptune1.2"
}

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_cluster using the cluster identifier. For example:

import {
  to = aws_neptune_cluster.example
  id = "my-cluster"
}

Using terraform import, import aws_neptune_cluster using the cluster identifier. For example:

% terraform import aws_neptune_cluster.example my-cluster