mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-14 22:02:22 -04:00
db_security_group is only intended to be used in EC2-Classic Platform. For DB instances in a VPC, we associate VPC security groups instead, when declaring the db_instance resource.
1.3 KiB
1.3 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| aws | AWS: aws_db_security_group | docs-aws-resource-db-security-group | Provides an RDS security group resource. |
aws_db_security_group
Provides an RDS security group resource. This is only for DB instances in the
EC2-Classic Platform. For instances inside a VPC, use the
aws_db_instance.vpc_security_group_ids
attribute instead.
Example Usage
resource "aws_db_security_group" "default" {
name = "rds_sg"
description = "RDS default security group"
ingress {
cidr = "10.0.0.0/24"
}
}
Argument Reference
The following arguments are supported:
name- (Required) The name of the DB security group.description- (Required) The description of the DB security group.ingress- (Optional) A list of ingress rules.
Ingress blocks support the following:
cidr- The CIDR block to acceptsecurity_group_name- The name of the security group to authorizesecurity_group_id- The ID of the security group to authorizesecurity_group_owner_id- The owner Id of the security group provided bysecurity_group_name.
Attributes Reference
The following attributes are exported:
id- The db security group ID.