Skip to content

Commit

Permalink
Create main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
misha-c authored May 7, 2021
1 parent 6663a12 commit 2e541f7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions modules/aws/ec2/elb/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
data "aws_vpc" "default" {
default = true
}
data "aws_availability_zones" "default" {
state = "available"
}

resource "aws_elb" "default" {
name = "web"
availability_zones = data.aws_availability_zones.default.names

listener {
instance_port = 80
instance_protocol = "http"
lb_port = 8080
lb_protocol = "http"
}

health_check {
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 3
target = "HTTP:80/"
interval = 30
}
instances = var.instances
cross_zone_load_balancing = true
idle_timeout = 400
connection_draining = true
connection_draining_timeout = 400


tags = merge( var.tags, { } )
}

variable "security_groups" {type = list(string)}
variable "instances" {type = list(string)}
//variable "target_ids" {}
variable "tags" {}

0 comments on commit 2e541f7

Please sign in to comment.