github.com/candidpartners/terraform@v0.9.5-0.20171005231213-29f5f88820f6/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  }