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
bool
Whether to create the subnet group resource. Set to
false to skip all resource creation.Default: truestring
The name of the DB subnet group. When
use_name_prefix is true, this is used as a prefix.Default: ""bool
Determines whether to use
name as-is or create a unique name beginning with name as the prefix.Default: truestring
The description of the DB subnet group.Default:
nulllist(string)
A list of VPC subnet IDs for the subnet group. At least two subnets in separate Availability Zones are recommended for high availability.Default:
[]string
Region where the subnet group will be managed. Defaults to the region set in the provider configuration.Default:
nullmap(string)
A mapping of tags to assign to the DB subnet group resource.Default:
{}Outputs
string
The name (ID) of the DB subnet group. Pass this to the
db_subnet_group_name input of a DB instance.string
The ARN of the DB subnet group.