Skip to content

Commit

Permalink
LB: Fix notebook configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dnillovna committed Oct 21, 2024
1 parent ab1a9db commit 7a108d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
8 changes: 4 additions & 4 deletions aws/common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ locals {
path = "/notebook/api"
matcher = "200"
}
priority = 4
conditions = [{ path_pattern = { values = ["/notebook/helper/*"] } }]
priority = 1
conditions = [{ path_pattern = { values = ["/notebook/*"] } }]
},
jnH = {
create_attachment = false
Expand All @@ -57,8 +57,8 @@ locals {
path = "/notebook/helper/info"
matcher = "200"
}
priority = 5
conditions = [{ path_pattern = { values = ["/notebook/*"] } }]
priority = 2
conditions = [{ path_pattern = { values = ["/notebook/helper/*"] } }]
}
}
}
Expand Down
26 changes: 4 additions & 22 deletions aws/lb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ module "lb_ext" {
action_type = "fixed-response"
fixed_response = {
status_code = 204
message_body = "No content. Try other endpoints for the URL: /jupyter, /notebook"
message_body = "No content. Try other endpoints for the URL: /notebook"
content_type = "text/plain"
}
rules = {
Expand Down Expand Up @@ -172,13 +172,6 @@ module "lb_int" {
protocol = "tcp"
description = "Access to HTTP"
cidr_ipv4 = try(module.vpc[0].vpc_cidr_block, var.cidr)
},
vpc_cvm = {
from_port = 8090
to_port = 8090
protocol = "tcp"
description = "Access Datagrok to CVM"
cidr_ipv4 = try(module.vpc[0].vpc_cidr_block, var.cidr)
}
}
security_group_egress_rules = {
Expand All @@ -204,24 +197,13 @@ module "lb_int" {
}

listeners = {
http-https-redirect = {
action_type = "redirect"
cvm = {
port = 80
protocol = "HTTP"
redirect = {
port = 443
protocol = "HTTPS"
status_code = "HTTP_301"
}
}
cvm = {
port = 443
protocol = "HTTPS"
certificate_arn = try(module.acm[0].acm_certificate_arn, var.acm_cert_arn)
action_type = "fixed-response"
action_type = "fixed-response"
fixed_response = {
status_code = 204
message_body = "No content. Try other endpoints for the URL: /jupyter, /notebook"
message_body = "No content. Try other endpoints for the URL: /notebook"
content_type = "text/plain"
}
rules = {
Expand Down

0 comments on commit 7a108d9

Please sign in to comment.