AWS Amazon Neptune Subnet Group

This page shows how to write Terraform and CloudFormation for Amazon Neptune Subnet Group and write them securely.

aws_neptune_subnet_group (Terraform)

The Subnet Group in Amazon Neptune can be configured in Terraform with the resource name aws_neptune_subnet_group. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

resource "aws_neptune_subnet_group" "default" {
  name        = local.subnet_group_name
  subnet_ids  = data.aws_subnet_ids.private.ids
  tags        = local.tags
  description = "Neptune Subnet Group"
resource "aws_neptune_subnet_group" "neptune-subnet-group" {
  subnet_ids = [,]

resource "aws_neptune_cluster" "my-neptune-cluster" {
  cluster_identifier                  = var.neptune_name
resource "aws_neptune_subnet_group" "default" {
  name       = var.subnet_group_name
  subnet_ids = var.subnet_ids

  tags = var.common_tags
resource "aws_neptune_subnet_group" "neptuneSubnetGroup" {
  name       = format("%s-%s-%s-%s",lookup(, "name"),lookup(var.tags, "product"),lookup(var.tags, "env"),"neptune-subnetgroup")
  subnet_ids = var.dbSubnets

  tags        = merge(


Explanation in Terraform Registry

Provides an Neptune subnet group resource.

AWS::Neptune::DBSubnetGroup (CloudFormation)

The DBSubnetGroup in Neptune can be configured in CloudFormation with the resource name AWS::Neptune::DBSubnetGroup. The following sections describe how to use the resource and its parameters.


Explanation in CloudFormation Registry

The AWS::Neptune::DBSubnetGroup type creates an Amazon Neptune DB subnet group. Subnet groups must contain at least two subnets in two different Availability Zones in the same AWS Region.

Frequently asked questions

What is AWS Amazon Neptune Subnet Group?

AWS Amazon Neptune Subnet Group is a resource for Amazon Neptune of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon Neptune Subnet Group?

For Terraform, the gmirsky/terraform-aws-neptune, imercier/terraform-play and JamesWoolfenden/terraform-aws-neptune source code examples are useful. See the Terraform Example section for further details.