AWS Amazon DocumentDB Subnet Group
This page shows how to write Terraform and CloudFormation for Amazon DocumentDB Subnet Group and write them securely.
aws_docdb_subnet_group (Terraform)
The Subnet Group in Amazon DocumentDB can be configured in Terraform with the resource name aws_docdb_subnet_group
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
arn
optional computed - string -
description
optional - string -
id
optional computed - string -
name
optional computed - string -
name_prefix
optional computed - string -
subnet_ids
required - set of string -
tags
optional - map from string to string
Explanation in Terraform Registry
Provides an DocumentDB subnet group resource.
Tips: Best Practices for The Other AWS Amazon DocumentDB Resources
In addition to the aws_docdb, AWS Amazon DocumentDB has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
aws_docdb_cluster
Ensure AWS DocumentDB logging is enabled
It is better to enable AWS DocumentDB logging for auditing and following compliance requirements.
AWS::DocDB::DBSubnetGroup (CloudFormation)
The DBSubnetGroup in DocDB can be configured in CloudFormation with the resource name AWS::DocDB::DBSubnetGroup
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
DBSubnetGroupName
optional - String -
DBSubnetGroupDescription
required - String -
SubnetIds
required - List -
Tags
optional - List of Tag
Explanation in CloudFormation Registry
The
AWS::DocDB::DBSubnetGroup
Amazon DocumentDB (with MongoDB compatibility) resource describes a DBSubnetGroup. subnet groups must contain at least one subnet in at least two Availability Zones in the AWS Region. For more information, see DBSubnetGroup in the Amazon DocumentDB Developer Guide.