mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-13 01:00:50 -04:00
1.3 KiB
1.3 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| aws | AWS: aws_db_subnet_group | docs-aws-resource-db-subnet-group | Provides an RDS DB subnet group resource. |
aws_db_subnet_group
Provides an RDS DB subnet group resource.
Example Usage
resource "aws_db_subnet_group" "default" {
name = "main"
subnet_ids = ["${aws_subnet.frontend.id}", "${aws_subnet.backend.id}"]
tags {
Name = "My DB subnet group"
}
}
Argument Reference
The following arguments are supported:
name- (Optional, Forces new resource) The name of the DB subnet group. If omitted, Terraform will assign a random, unique name.name_prefix- (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts withname.description- (Optional) The description of the DB subnet group. Defaults to "Managed by Terraform".subnet_ids- (Required) A list of VPC subnet IDs.tags- (Optional) A mapping of tags to assign to the resource.
Attributes Reference
The following attributes are exported:
id- The db subnet group name.arn- The ARN of the db subnet group.
Import
DB Subnet groups can be imported using the name, e.g.
$ terraform import aws_db_subnet_group.default production-subnet-group