Forked from chrisferry/gist:780140d709bfad51038c
Last active
August 29, 2015 14:25
-
-
Save jaymecd/6d4cd173119ce0d2effc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# iops | |
resource "aws_db_instance" "rds" { | |
identifier = "${var.identifier}" | |
allocated_storage = "${var.allocated_storage}" | |
iops = "${var.iops}" | |
engine = "${var.engine}" | |
engine_version = "${var.engine_version}" | |
instance_class = "${var.instance_class}" | |
name = "${var.db_name}" | |
username = "${var.db_username}" | |
password = "${var.db_password}" | |
db_subnet_group_name = "${var.db_subnet_group_name}" | |
parameter_group_name = "${var.parameter_group_name}" | |
vpc_security_group_ids = ["${split(",", var.vpc_security_group_ids)}"] | |
} | |
#non iops | |
resource "aws_db_instance" "rds" { | |
identifier = "${var.identifier}" | |
allocated_storage = "${var.allocated_storage}" | |
storage_type = "${var.storage_type}" | |
engine = "${var.engine}" | |
engine_version = "${var.engine_version}" | |
instance_class = "${var.instance_class}" | |
name = "${var.db_name}" | |
username = "${var.db_username}" | |
password = "${var.db_password}" | |
db_subnet_group_name = "${var.db_subnet_group_name}" | |
parameter_group_name = "${var.parameter_group_name}" | |
vpc_security_group_ids = ["${split(",", var.vpc_security_group_ids)}"] | |
} | |
#elb non-ssl | |
resource "aws_elb" "elb" { | |
name = "${var.elb_name}" | |
subnets = ["${split(",", var.subnet_azs)}"] | |
internal = "${var.elb_is_internal}" | |
security_groups = ["${var.elb_security_group}"] | |
listener { | |
instance_port = "${var.backend_port}" | |
instance_protocol = "${var.backend_protocol}" | |
lb_port = "${var.lb_port}" | |
lb_protocol = "${var.lb_protocol}" | |
} | |
health_check { | |
healthy_threshold = 2 | |
unhealthy_threshold = 2 | |
timeout = 3 | |
target = "${var.health_check_target}" | |
interval = 30 | |
} | |
cross_zone_load_balancing = true | |
} | |
#elb ssl | |
resource "aws_elb" "elb" { | |
name = "${var.elb_name}" | |
subnets = ["${split(",", var.subnet_azs)}"] | |
internal = "${var.elb_is_internal}" | |
security_groups = ["${var.elb_security_group}"] | |
listener { | |
instance_port = "${var.backend_port}" | |
instance_protocol = "${var.backend_protocol}" | |
lb_port = "${var.lb_port}" | |
lb_protocol = "${var.lb_protocol}" | |
ssl_certificate_id = "${var.ssl_certificate_id}" | |
} | |
health_check { | |
healthy_threshold = 2 | |
unhealthy_threshold = 2 | |
timeout = 3 | |
target = "${var.health_check_target}" | |
interval = 30 | |
} | |
cross_zone_load_balancing = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment