-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP(ELB): Synchronized and renamed ELB resources and data sources.
- Loading branch information
1 parent
ba09928
commit 33ef55a
Showing
57 changed files
with
2,742 additions
and
750 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
subcategory: "Elastic Load Balance (ELB)" | ||
--- | ||
|
||
# flexibleengine_lb_certificate_v2 | ||
|
||
Use this data source to get the certificate details in FlexibleEngine Elastic Load Balance (ELB). | ||
|
||
## Example Usage | ||
|
||
The following example shows how one might accept a certificate name as a variable to fetch this data source. | ||
|
||
```hcl | ||
variable "cert_name" {} | ||
data "flexibleengine_lb_certificate_v2" "by_name" { | ||
name = var.cert_name | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The arguments of this data source act as filters for querying the available Certificates in the current region. | ||
The given filters must match exactly one Certificate whose data will be exported as attributes. | ||
|
||
* `id` - (Optional, String) The id of the specific Certificate to retrieve. | ||
|
||
* `name` - (Optional, String) Human-readable name for the Certificate. Does not have to be unique. | ||
|
||
* `description` - (Optional, String) Human-readable description for the LB Certificate. | ||
|
||
* `domain` - (Optional, String) The domain of the Certificate. | ||
|
||
## Attribute Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
|
||
* `private_key` - The private encrypted key of the Certificate, PEM format. | ||
|
||
* `certificate` - The public encrypted key of the Certificate, PEM format. | ||
|
||
* `update_time` - Indicates the update time. | ||
|
||
* `create_time` - Indicates the creation time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
subcategory: "Elastic Load Balance (ELB)" | ||
--- | ||
|
||
# flexibleengine_lb_listeners_v2 | ||
|
||
Use this data source to query the list of ELB listeners. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
variable "protocol" {} | ||
data "flexibleengine_lb_listeners_v2" "test" { | ||
protocol = var.protocol | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `region` - (Optional, String) Specifies the region in which to query the data source. | ||
If omitted, the provider-level region will be used. | ||
|
||
* `name` - (Optional, String) The listener name. | ||
|
||
* `protocol` - (Optional, String) The listener protocol. | ||
The valid values are **TCP**, **UDP**, **HTTP** and **TERMINATED_HTTPS**. | ||
|
||
* `protocol_port` - (Optional, String) The front-end listening port of the listener. | ||
The valid value is range from `1` to `65535`. | ||
|
||
## Attribute Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
|
||
* `id` - The resource ID. | ||
|
||
* `listeners` - Listener list. | ||
The [listeners](#listeners_listeners) structure is documented below. | ||
|
||
<a name="listeners_listeners"></a> | ||
The `listeners` block supports: | ||
|
||
* `id` - The ELB listener ID. | ||
|
||
* `name` - The listener name. | ||
|
||
* `protocol` - The listener protocol. | ||
|
||
* `protocol_port` - The front-end listening port of the listener. | ||
|
||
* `default_pool_id` - The ID of the default pool with which the ELB listener is associated. | ||
|
||
* `description` - The description of the ELB listener. | ||
|
||
* `connection_limit` - The maximum number of connections allowed for the listener. | ||
|
||
* `http2_enable` - Whether the ELB listener uses HTTP/2. | ||
|
||
* `default_tls_container_ref` - The ID of the server certificate used by the listener. | ||
|
||
* `sni_container_refs` - List of the SNI certificate (server certificates with a domain name) IDs used by the listener. | ||
|
||
* `loadbalancers` - Listener list. | ||
The [loadbalancers](#listeners_loadbalancers) structure is documented below. | ||
|
||
<a name="listeners_loadbalancers"></a> | ||
The `loadbalancers` block supports: | ||
|
||
* `id` - The ELB loadbalancer ID. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
subcategory: "Elastic Load Balance (ELB)" | ||
--- | ||
|
||
# flexibleengine_lb_loadbalancer | ||
|
||
Use this data source to get a specific elb loadbalancer within FlexibleEngine. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
variable "lb_name" {} | ||
data "flexibleengine_lb_loadbalancer" "test" { | ||
name = var.lb_name | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
* `region` - (Optional, String) Specifies the region in which to obtain the load balancer. If omitted, the | ||
provider-level region will be used. | ||
|
||
* `name` - (Optional, String) Specifies the name of the load balancer. | ||
|
||
* `id` - (Optional, String) Specifies the data source ID of the load balancer in UUID format. | ||
|
||
* `status` - (Optional, String) Specifies the operating status of the load balancer. Valid values are *ONLINE* and | ||
*FROZEN*. | ||
|
||
* `description` - (Optional, String) Specifies the supplementary information about the load balancer. | ||
|
||
* `vip_address` - (Optional, String) Specifies the private IP address of the load balancer. | ||
|
||
* `vip_subnet_id` - (Optional, String) Specifies the **IPv4 subnet ID** of the subnet where the load balancer works. | ||
|
||
* `enterprise_project_id` - (Optional, String) Specifies the enterprise project id of the load balancer. | ||
|
||
## Attribute Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
|
||
* `tags` - The tags associated with the load balancer. | ||
|
||
* `vip_port_id` - The ID of the port bound to the private IP address of the load balancer. | ||
|
||
* `public_ip` - The EIP address that is associated to the Load Balancer instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
subcategory: "Elastic Load Balance (ELB)" | ||
description: "" | ||
page_title: "flexibleengine_lb_l7policy" | ||
--- | ||
|
||
# flexibleengine_lb_l7policy | ||
|
||
Manages an **enhanced** load balancer L7 Policy resource within FlexibleEngine. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
resource "flexibleengine_lb_loadbalancer" "loadbalancer_1" { | ||
name = "loadbalancer_1" | ||
vip_subnet_id = flexibleengine_vpc_subnet_v1.example_subnet.ipv4_subnet_id | ||
} | ||
resource "flexibleengine_lb_listener" "listener_1" { | ||
name = "listener_1" | ||
protocol = "HTTP" | ||
protocol_port = 8080 | ||
loadbalancer_id = flexibleengine_lb_loadbalancer.loadbalancer_1.id | ||
} | ||
resource "flexibleengine_lb_pool" "pool_1" { | ||
name = "pool_1" | ||
protocol = "HTTP" | ||
lb_method = "ROUND_ROBIN" | ||
loadbalancer_id = flexibleengine_lb_loadbalancer.loadbalancer_1.id | ||
} | ||
resource "flexibleengine_lb_l7policy" "l7policy_1" { | ||
name = "test" | ||
action = "REDIRECT_TO_POOL" | ||
description = "test l7 policy" | ||
position = 1 | ||
listener_id = flexibleengine_lb_listener.listener_1.id | ||
redirect_pool_id = flexibleengine_lb_pool.pool_1.id | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `region` - (Optional, String, ForceNew) The region in which to obtain the V2 Networking client. | ||
A Networking client is needed to create an . If omitted, the | ||
`region` argument of the provider is used. Changing this creates a new L7 Policy. | ||
|
||
* `name` - (Optional, String) Human-readable name for the L7 Policy. Does not have to be unique. | ||
|
||
* `description` - (Optional, String) Human-readable description for the L7 Policy. | ||
|
||
* `action` - (Required, String, ForceNew) The L7 Policy action - can either be REDIRECT_TO_POOL, | ||
or REDIRECT_TO_LISTENER. Changing this creates a new L7 Policy. | ||
|
||
* `listener_id` - (Required, String, ForceNew) The Listener on which the L7 Policy will be associated with. | ||
Changing this creates a new L7 Policy. | ||
|
||
* `position` - (Optional, Int, ForceNew) The position of this policy on the listener. Positions start at 1. | ||
Changing this creates a new L7 Policy. | ||
|
||
* `redirect_pool_id` - (Optional, String) Requests matching this policy will be redirected to | ||
the pool with this ID. Only valid if action is REDIRECT_TO_POOL. | ||
|
||
* `redirect_listener_id` - (Optional, String) Requests matching this policy will be redirected to | ||
the listener with this ID. Only valid if action is REDIRECT_TO_LISTENER. | ||
|
||
## Attribute Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
|
||
* `id` - The unique ID for the L7 policy. | ||
|
||
## Timeouts | ||
|
||
This resource provides the following timeouts configuration options: | ||
|
||
* `create` - Default is 10 minutes. | ||
* `update` - Default is 10 minutes. | ||
* `delete` - Default is 10 minutes. | ||
|
||
## Import | ||
|
||
Load Balancer L7 Policy can be imported using the L7 Policy ID, e.g.: | ||
|
||
```shell | ||
terraform import flexibleengine_lb_l7policy.l7policy_1 8a7a79c2-cf17-4e65-b2ae-ddc8bfcf6c74 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.