db_subnet_group submodule creates an aws_db_subnet_group that spans a list of VPC subnets. DB instances must be associated with a subnet group to run within a VPC.
Source
Usage
Use this submodule standalone when you want to manage a subnet group separately from a DB instance, or share it across multiple instances:Input variables
Whether to create the subnet group resource. Set to
false to skip all resource creation.Default: trueThe name of the DB subnet group. When
use_name_prefix is true, this is used as a prefix.Default: ""Determines whether to use
name as-is or create a unique name beginning with name as the prefix.Default: trueThe description of the DB subnet group.Default:
nullA list of VPC subnet IDs for the subnet group. At least two subnets in separate Availability Zones are recommended for high availability.Default:
[]Region where the subnet group will be managed. Defaults to the region set in the provider configuration.Default:
nullA mapping of tags to assign to the DB subnet group resource.Default:
{}Outputs
The name (ID) of the DB subnet group. Pass this to the
db_subnet_group_name input of a DB instance.The ARN of the DB subnet group.