github.com/jrasell/terraform@v0.6.17-0.20160523115548-2652f5232949/examples/aws-rds/main.tf (about) 1 resource "aws_db_instance" "default" { 2 depends_on = ["aws_security_group.default"] 3 identifier = "${var.identifier}" 4 allocated_storage = "${var.storage}" 5 engine = "${var.engine}" 6 engine_version = "${lookup(var.engine_version, var.engine)}" 7 instance_class = "${var.instance_class}" 8 name = "${var.db_name}" 9 username = "${var.username}" 10 password = "${var.password}" 11 vpc_security_group_ids = ["${aws_security_group.default.id}"] 12 db_subnet_group_name = "${aws_db_subnet_group.default.id}" 13 } 14 15 resource "aws_db_subnet_group" "default" { 16 name = "main_subnet_group" 17 description = "Our main group of subnets" 18 subnet_ids = ["${aws_subnet.subnet_1.id}", "${aws_subnet.subnet_2.id}"] 19 }