Skip to content

Commit d4df0d3

Browse files
committed
update lb_full example to include hostnames in the listener
1 parent 1401338 commit d4df0d3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/examples/load_balancer/lb_full/lb_full.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,25 @@ resource "oci_load_balancer_path_route_set" "test_path_route_set" {
234234
}
235235
}
236236

237+
resource "oci_load_balancer_hostname" "test_hostname1" {
238+
#Required
239+
hostname = "app.example.com"
240+
load_balancer_id = "${oci_load_balancer.lb1.id}"
241+
name = "hostname1"
242+
}
243+
244+
resource "oci_load_balancer_hostname" "test_hostname2" {
245+
#Required
246+
hostname = "app2.example.com"
247+
load_balancer_id = "${oci_load_balancer.lb1.id}"
248+
name = "hostname2"
249+
}
250+
237251
resource "oci_load_balancer_listener" "lb-listener1" {
238252
load_balancer_id = "${oci_load_balancer.lb1.id}"
239253
name = "http"
240254
default_backend_set_name = "${oci_load_balancer_backend_set.lb-bes1.id}"
255+
hostname_names = ["${oci_load_balancer_hostname.test_hostname1.name}", "${oci_load_balancer_hostname.test_hostname2.name}"]
241256
port = 80
242257
protocol = "HTTP"
243258
connection_configuration {

0 commit comments

Comments
 (0)