github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/aws/r/db_subnet_group.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_db_subnet_group" 4 sidebar_current: "docs-aws-resource-db-subnet-group" 5 description: |- 6 Provides an RDS DB subnet group resource. 7 --- 8 9 # aws\_db\_subnet\_group 10 11 Provides an RDS DB subnet group resource. 12 13 ## Example Usage 14 15 ```hcl 16 resource "aws_db_subnet_group" "default" { 17 name = "main" 18 subnet_ids = ["${aws_subnet.frontend.id}", "${aws_subnet.backend.id}"] 19 20 tags { 21 Name = "My DB subnet group" 22 } 23 } 24 ``` 25 26 ## Argument Reference 27 28 The following arguments are supported: 29 30 * `name` - (Optional, Forces new resource) The name of the DB subnet group. If omitted, Terraform will assign a random, unique name. 31 * `name_prefix` - (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts with `name`. 32 * `description` - (Optional) The description of the DB subnet group. Defaults to "Managed by Terraform". 33 * `subnet_ids` - (Required) A list of VPC subnet IDs. 34 * `tags` - (Optional) A mapping of tags to assign to the resource. 35 36 ## Attributes Reference 37 38 The following attributes are exported: 39 40 * `id` - The db subnet group name. 41 * `arn` - The ARN of the db subnet group. 42 43 44 ## Import 45 46 DB Subnet groups can be imported using the `name`, e.g. 47 48 ``` 49 $ terraform import aws_db_subnet_group.default production-subnet-group 50 ```