Skip to content

Commit cee9668

Browse files
committed
feat(SNI_Load_Balancer):updated docs
1 parent e2eb2ea commit cee9668

File tree

2 files changed

+40
-6
lines changed

2 files changed

+40
-6
lines changed

website/docs/d/is_lb_listener_policy.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Nested scheme for `rules`:
5252
- `href` - (String) The rule's canonical URL.
5353
- `id` - (String) The rule's unique identifier.
5454

55-
- `target` - (List) - If `action` is `forward`, the response is a `LoadBalancerPoolReference`-If `action` is `forward_to_pool`, the response is a `LoadBalancerPoolReference`-If `action` is `forward_to_listener`, specify a `LoadBalancerListenerIdentity` in this load balancer to forward to.`- If `action` is `redirect`, the response is a `LoadBalancerListenerPolicyRedirectURL`- If `action` is `https_redirect`, the response is a `LoadBalancerListenerHTTPSRedirect`.
55+
- `target` - (List) -If `action` is `forward_to_pool`, the response is a `LoadBalancerPoolReference`-If `action` is `forward_to_listener`, specify a `LoadBalancerListenerIdentity` in this load balancer to forward to.`- If `action` is `redirect`, the response is a `LoadBalancerListenerPolicyRedirectURL`- If `action` is `https_redirect`, the response is a `LoadBalancerListenerHTTPSRedirect`.
5656
Nested scheme for `target`:
5757
- `deleted` - (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
5858
Nested scheme for `deleted`:

website/docs/r/is_lb_listener_policy.html.markdown

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ resource "ibm_is_lb_listener_policy" "example" {
119119
}
120120
```
121121

122-
### Creating a load balancer listener policy for a `forward` action.
122+
### Creating a load balancer listener policy for a `forward_to_pool` action.
123123

124124

125125
```terraform
@@ -148,14 +148,48 @@ resource "ibm_is_lb_pool" "example" {
148148
resource "ibm_is_lb_listener_policy" "example" {
149149
lb = ibm_is_lb.example.id
150150
listener = ibm_is_lb_listener.example.listener_id
151-
action = "forward"
151+
action = "forward_to_pool"
152152
priority = 3
153153
name = "example-listener"
154154
target {
155155
id = ibm_is_lb_pool.example.pool_id
156156
}
157157
}
158158
```
159+
160+
### Creating a load balancer listener policy for a `forward_to_listener` action.
161+
162+
163+
```terraform
164+
resource "ibm_is_lb" "example" {
165+
name = "example-lb"
166+
subnets = [ibm_is_subnet.example.id]
167+
}
168+
169+
resource "ibm_is_lb_listener" "example" {
170+
lb = ibm_is_lb.example.id
171+
port = "9086"
172+
protocol = "http"
173+
}
174+
175+
resource "ibm_is_lb_listener" "example1" {
176+
lb = ibm_is_lb.example.id
177+
port = "9087"
178+
protocol = "tcp"
179+
}
180+
181+
resource "ibm_is_lb_listener_policy" "example" {
182+
lb = ibm_is_lb.example.id
183+
listener = ibm_is_lb_listener.example.listener_id
184+
action = "forward_to_listener"
185+
priority = 2
186+
name = "example-listener"
187+
target {
188+
id = ibm_is_lb_listener.example1.listener_id
189+
}
190+
}
191+
```
192+
159193
## Timeouts
160194
The `ibm_is_lb_listener_policy` resource provides the following [Timeouts](https://www.terraform.io/docs/language/resources/syntax.html) configuration options:
161195

@@ -179,7 +213,7 @@ Review the argument references that you can specify for your resource.
179213
- `type` - (Required, String) The data type where you want to apply the rule condition. Supported values are `header`, `hostname`, and `path`.
180214
- `value`- (Required, Integer) The value that must be found in the HTTP header, hostname or path to apply the load balancer listener rule. The value that you define can be between 1 and 128 characters long.
181215
- `field`- (Required, Integer) If you selected `header` as the data type where you want to apply the rule condition, enter the name of the HTTP header that you want to check. The name of the header can be between 1 and 128 characters long.
182-
- `target_id` - (Optional, Integer) When `action` is set to **forward**, specify the ID of the load balancer pool that the load balancer forwards network traffic to.
216+
- `target_id` - (Optional, Integer) When `action` is set to **forward_to_pool**, specify the ID of the load balancer pool that the load balancer forwards network traffic to. or When `action` is set to **forward_to_listener**, specify the ID of the load balancer listener that the load balancer forwards network traffic to.
183217
- `target_http_status_code` - (Optional, Integer) When `action` is set to **redirect**, specify the HTTP response code that must be returned in the redirect response. Supported values are `301`, `302`, `303`, `307`, and `308`.
184218
- `target_url` - (Optional, Integer) When `action` is set to **redirect**, specify the URL that is used in the redirect response.
185219
- `target_https_redirect_listener` - (Optional, String) When `action` is set to **https_redirect**, specify the ID of the listener that will be set as http redirect target.
@@ -188,7 +222,7 @@ Review the argument references that you can specify for your resource.
188222

189223
~> **Note:** `target_id`, `target_http_status_code`, `target_url`, `target_https_redirect_listener`, `target_https_redirect_status_code`, `target_https_redirect_uri` are deprecated and will be removed soon. Please use `target` instead.
190224

191-
- `target` - (Optional, List) - If `action` is `forward`, the response is a `LoadBalancerPoolReference`- If `action` is `redirect`, the response is a `LoadBalancerListenerPolicyRedirectURL`- If `action` is `https_redirect`, the response is a `LoadBalancerListenerHTTPSRedirect`.
225+
- `target` - (Optional, List) - If `action` is `forward_to_pool`, the response is a `LoadBalancerPoolReference`-If `action` is `forward_to_listener`, specify a `LoadBalancerListenerIdentity` in this load balancer to forward to.- If `action` is `redirect`, the response is a `LoadBalancerListenerPolicyRedirectURL`- If `action` is `https_redirect`, the response is a `LoadBalancerListenerHTTPSRedirect`.
192226
Nested schema for **target**:
193227
- `deleted` - (Computed, List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
194228
Nested schema for **deleted**:
@@ -213,7 +247,7 @@ Review the argument references that you can specify for your resource.
213247
**&#x2022;** query (default: '') </br>
214248

215249
216-
~> **Note:** When action is `forward``target.id` should specify which pool the load balancer forwards the traffic to.
250+
~> **Note:** When `action` is set to **forward_to_pool**, specify the ID of the load balancer pool that the load balancer forwards network traffic to. or When `action` is set to **forward_to_listener**, specify the ID of the load balancer listener that the load balancer forwards network traffic to.
217251
When action is `redirect`, `target.url` should specify the `url` and `target.http_status_code` to specify the code used in the redirect response.
218252
When action is `https_redirect`, `target.listener.id` should specify the ID of the listener, `target.http_status_code` to specify the code used in the redirect response and `target.uri` to specify the target URI where traffic will be redirected.
219253
Network load balancer does not support `ibm_is_lb_listener_policy`.

0 commit comments

Comments
 (0)