2015-08-04 19:16:42 +02:00
|
|
|
---
|
|
|
|
layout: "cloudstack"
|
|
|
|
page_title: "CloudStack: cloudstack_loadbalancer_rule"
|
|
|
|
sidebar_current: "docs-cloudstack-resource-loadbalancer-rule"
|
|
|
|
description: |-
|
|
|
|
Creates a load balancer rule.
|
|
|
|
---
|
|
|
|
|
|
|
|
# cloudstack\_loadbalancer\_rule
|
|
|
|
|
|
|
|
Creates a loadbalancer rule.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "cloudstack_loadbalancer_rule" "default" {
|
|
|
|
name = "loadbalancer-rule-1"
|
|
|
|
description = "Loadbalancer rule 1"
|
2016-04-11 17:14:19 +02:00
|
|
|
ip_address_id = "30b21801-d4b3-4174-852b-0c0f30bdbbfb"
|
2015-08-04 19:16:42 +02:00
|
|
|
algorithm = "roundrobin"
|
|
|
|
private_port = 80
|
|
|
|
public_port = 80
|
2016-04-11 17:14:19 +02:00
|
|
|
member_ids = ["f8141e2f-4e7e-4c63-9362-986c908b7ea7"]
|
2015-08-04 19:16:42 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) Name of the loadbalancer rule.
|
|
|
|
Changing this forces a new resource to be created.
|
|
|
|
|
|
|
|
* `description` - (Optional) The description of the load balancer rule.
|
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `ip_address_id` - (Required) Public IP address ID from where the network
|
|
|
|
traffic will be load balanced from. Changing this forces a new resource
|
|
|
|
to be created.
|
2015-08-04 19:16:42 +02:00
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `network_id` - (Optional) The network ID this rule will be created for.
|
|
|
|
Required when public IP address is not associated with any network yet
|
|
|
|
(VPC case).
|
|
|
|
|
2016-04-04 22:13:27 +02:00
|
|
|
* `algorithm` - (Required) Load balancer rule algorithm (source, roundrobin,
|
|
|
|
leastconn). Changing this forces a new resource to be created.
|
2015-08-04 19:16:42 +02:00
|
|
|
|
2016-04-04 22:13:27 +02:00
|
|
|
* `private_port` - (Required) The private port of the private IP address
|
|
|
|
(virtual machine) where the network traffic will be load balanced to.
|
2015-08-04 19:16:42 +02:00
|
|
|
Changing this forces a new resource to be created.
|
|
|
|
|
2016-04-04 22:13:27 +02:00
|
|
|
* `public_port` - (Required) The public port from where the network traffic
|
|
|
|
will be load balanced from. Changing this forces a new resource to be
|
|
|
|
created.
|
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `member_ids` - (Required) List of instance IDs to assign to the load balancer
|
|
|
|
rule. Changing this forces a new resource to be created.
|
|
|
|
|
2016-07-27 17:30:18 +02:00
|
|
|
* `project` - (Optional) The name or ID of the project to deploy this
|
|
|
|
instance to. Changing this forces a new resource to be created.
|
|
|
|
|
2015-08-04 19:16:42 +02:00
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The load balancer rule ID.
|
|
|
|
* `description` - The description of the load balancer rule.
|