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
-
arnoptional computed - string -
descriptionoptional - string -
idoptional computed - string -
nameoptional computed - string -
name_prefixoptional computed - string -
subnet_idsrequired - set of string -
tagsoptional - 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
-
DBSubnetGroupNameoptional - String -
DBSubnetGroupDescriptionrequired - String -
SubnetIdsrequired - List -
Tagsoptional - List of Tag
Explanation in CloudFormation Registry
The
AWS::DocDB::DBSubnetGroupAmazon 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.