Last active
July 15, 2020 11:43
-
-
Save AndrewBestbier/48eaf7cab63ff369deb9758434cd4c11 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
| resource "aws_lb_target_group" "target_group" { | |
| name = "target-group" | |
| port = 80 | |
| protocol = "HTTP" | |
| target_type = "ip" | |
| vpc_id = "${aws_default_vpc.default_vpc.id}" # Referencing the default VPC | |
| health_check { | |
| matcher = "200,301,302" | |
| path = "/" | |
| } | |
| } | |
| resource "aws_lb_listener" "listener" { | |
| load_balancer_arn = "${aws_alb.application_load_balancer.arn}" # Referencing our load balancer | |
| port = "80" | |
| protocol = "HTTP" | |
| default_action { | |
| type = "forward" | |
| target_group_arn = "${aws_lb_target_group.target_group.arn}" # Referencing our tagrte group | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment