You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/d/is_lb_listener_policy.html.markdown
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Nested scheme for `rules`:
52
52
- `href` - (String) The rule's canonical URL.
53
53
- `id` - (String) The rule's unique identifier.
54
54
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`.
56
56
Nested scheme for `target`:
57
57
- `deleted` - (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
### 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
+
159
193
## Timeouts
160
194
The `ibm_is_lb_listener_policy` resource provides the following [Timeouts](https://www.terraform.io/docs/language/resources/syntax.html) configuration options:
161
195
@@ -179,7 +213,7 @@ Review the argument references that you can specify for your resource.
179
213
-`type` - (Required, String) The data type where you want to apply the rule condition. Supported values are `header`, `hostname`, and `path`.
180
214
-`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.
181
215
-`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.
183
217
-`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`.
184
218
-`target_url` - (Optional, Integer) When `action` is set to **redirect**, specify the URL that is used in the redirect response.
185
219
-`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.
188
222
189
223
~> **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.
190
224
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`.
192
226
Nested schema for **target**:
193
227
- `deleted` - (Computed, List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
194
228
Nested schema for **deleted**:
@@ -213,7 +247,7 @@ Review the argument references that you can specify for your resource.
213
247
**•** query (default: '') </br>
214
248
215
249
216
-
~> **Note:** Whenaction 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.
217
251
When action is `redirect`, `target.url` should specify the `url` and `target.http_status_code` to specify the code used in the redirect response.
218
252
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.
219
253
Network load balancer does not support `ibm_is_lb_listener_policy`.
0 commit comments