Skip to content

Commit 1ffb37d

Browse files
parwezarcohenma
authored andcommitted
adding hostname resource and adding hostnameNames parameter to listener resource
1 parent b488ee1 commit 1ffb37d

File tree

8 files changed

+737
-49
lines changed

8 files changed

+737
-49
lines changed

docs/load_balancer/hostnames.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# oci_load_balancer_hostname
2+
3+
## Hostname Resource
4+
5+
### Hostname Reference
6+
7+
The following attributes are exported:
8+
9+
* `hostname` - A virtual hostname. For more information about virtual hostname string construction, see [Managing Request Routing](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). Example: `app.example.com`
10+
* `name` - A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: `example_hostname_001`
11+
12+
13+
14+
### Create Operation
15+
Adds a hostname resource to the specified load balancer. For more information, see
16+
[Managing Request Routing](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm).
17+
18+
19+
The following arguments are supported:
20+
21+
* `hostname` - (Required) A virtual hostname. For more information about virtual hostname string construction, see [Managing Request Routing](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). Example: `app.example.com`
22+
* `load_balancer_id` - (Required) The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to add the hostname to.
23+
* `name` - (Required) A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: `example_hostname_001`
24+
25+
26+
### Update Operation
27+
Overwrites an existing hostname resource on the specified load balancer. Use this operation to change a
28+
virtual hostname.
29+
30+
31+
The following arguments support updates:
32+
* `hostname` - A virtual hostname. For more information about virtual hostname string construction, see [Managing Request Routing](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#routing). Example: `app.example.com`
33+
34+
35+
** IMPORTANT **
36+
Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
37+
38+
### Example Usage
39+
40+
```
41+
resource "oci_load_balancer_hostname" "test_hostname" {
42+
#Required
43+
hostname = "${var.hostname_hostname}"
44+
load_balancer_id = "${oci_load_balancer_load_balancer.test_load_balancer.id}"
45+
name = "${var.hostname_name}"
46+
}
47+
```
48+
49+
# oci_load_balancer_hostnames
50+
51+
## Hostname DataSource
52+
53+
Gets a list of hostnames.
54+
55+
### List Operation
56+
Lists all hostname resources associated with the specified load balancer.
57+
The following arguments are supported:
58+
59+
* `load_balancer_id` - (Required) The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the hostnames to retrieve.
60+
61+
62+
The following attributes are exported:
63+
64+
* `hostnames` - The list of hostnames.
65+
66+
### Example Usage
67+
68+
```
69+
data "oci_load_balancer_hostnames" "test_hostnames" {
70+
#Required
71+
load_balancer_id = "${oci_load_balancer_load_balancer.test_load_balancer.id}"
72+
}
73+
```

docs/load_balancer/listeners.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ The following attributes are exported:
88

99
* `connection_configuration` -
1010
* `idle_timeout_in_seconds` - The maximum idle time, in seconds, allowed between two successive receive or two successive send operations between the client and backend servers. A send operation does not reset the timer for receive operations. A receive operation does not reset the timer for send operations. The default values are: * 300 seconds for TCP * 60 seconds for HTTP and WebSocket protocols. Note: The protocol is set at the listener. Modify this parameter if the client or backend server stops transmitting data for more than the default time. Some examples include: * The client sends a database query to the backend server and the database takes over 300 seconds to execute. Therefore, the backend server does not transmit any data within 300 seconds. * The client uploads data using the HTTP protocol. During the upload, the backend does not transmit any data to the client for more than 60 seconds. * The client downloads data using the HTTP protocol. After the initial request, it stops transmitting data to the backend server for more than 60 seconds. * The client starts transmitting data after establishing a WebSocket connection, but the backend server does not transmit data for more than 60 seconds. * The backend server starts transmitting data after establishing a WebSocket connection, but the client does not transmit data for more than 60 seconds. The maximum value is 7200 seconds. Contact My Oracle Support to file a service request if you want to increase this limit for your tenancy. For more information, see [Service Limits](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). Example: `1200`
11-
* `default_backend_set_name` - The name of the associated backend set. Example: `My_backend_set`
11+
* `default_backend_set_name` - The name of the associated backend set. Example: `example_backend_set`
12+
* `hostname_names` - An array of hostname resource names.
1213
* `load_balancer_id` - The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a listener.
1314
* `name` - A friendly name for the listener. It must be unique and it cannot be changed. Avoid entering confidential information. Example: `My listener`
1415
* `path_route_set_name` - The name of the set of path-based routing rules, [PathRouteSet](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/PathRouteSet/), applied to this listener's traffic. Example: `path-route-set-001`
1516
* `port` - The communication port for the listener. Example: `80`
1617
* `protocol` - The protocol on which the listener accepts connection requests. To get a list of valid protocols, use the [ListProtocols](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/LoadBalancerProtocol/ListProtocols) operation. Example: `HTTP`
1718
* `ssl_configuration` -
18-
* `certificate_name` - A friendly name for the certificate bundle. It must be unique and it cannot be changed. Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. Certificate bundle names cannot contain spaces. Avoid entering confidential information. Example: `My_certificate_bundle`
19+
* `certificate_name` - A friendly name for the certificate bundle. It must be unique and it cannot be changed. Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. Certificate bundle names cannot contain spaces. Avoid entering confidential information. Example: `example_certificate_bundle`
1920
* `verify_depth` - The maximum depth for peer certificate chain verification. Example: `3`
2021
* `verify_peer_certificate` - Whether the load balancer listener should verify peer certificates. Example: `true`
2122

@@ -27,15 +28,16 @@ Adds a listener to a load balancer.
2728
The following arguments are supported:
2829

2930
* `connection_configuration` - (Optional)
30-
* `idle_timeout_in_seconds` - (Required) The maximum idle time, in seconds, allowed between two successive receive or two successive send operations between the client and backend servers. A send operation does not reset the timer for receive operations. A receive operation does not reset the timer for send operations. The default values are: * 300 seconds for TCP * 60 seconds for HTTP and WebSocket protocols. Note: The protocol is set at the listener. Modify this parameter if the client or backend server stops transmitting data for more than the default time. Some examples include: * The client sends a database query to the backend server and the database takes over 300 seconds to execute. Therefore, the backend server does not transmit any data within 300 seconds. * The client uploads data using the HTTP protocol. During the upload, the backend does not transmit any data to the client for more than 60 seconds. * The client downloads data using the HTTP protocol. After the initial request, it stops transmitting data to the backend server for more than 60 seconds. * The client starts transmitting data after establishing a WebSocket connection, but the backend server does not transmit data for more than 60 seconds. * The backend server starts transmitting data after establishing a WebSocket connection, but the client does not transmit data for more than 60 seconds. The maximum value is 7200 seconds. Contact My Oracle Support to file a service request if you want to increase this limit for your tenancy. For more information, see [Service Limits](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). Example: `1200`
31-
* `default_backend_set_name` - (Required) The name of the associated backend set. Example: `My_backend_set`
31+
* `idle_timeout_in_seconds` - (Required) The maximum idle time, in seconds, allowed between two successive receive or two successive send operations between the client and backend servers. A send operation does not reset the timer for receive operations. A receive operation does not reset the timer for send operations. For more information, see [Connection Configuration](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/connectionreuse.htm#ConnectionConfiguration). Example: `1200`
32+
* `default_backend_set_name` - (Required) The name of the associated backend set. Example: `example_backend_set`
33+
* `hostname_names` - (Optional) An array of hostname resource names.
3234
* `load_balancer_id` - (Required) The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a listener.
33-
* `name` - (Required) A friendly name for the listener. It must be unique and it cannot be changed. Avoid entering confidential information. Example: `My listener`
34-
* `path_route_set_name` - (Optional) The name of the set of path-based routing rules, [PathRouteSet](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/PathRouteSet/), applied to this listener's traffic. Example: `path-route-set-001`
35+
* `name` - (Required) A friendly name for the listener. It must be unique and it cannot be changed. Avoid entering confidential information. Example: `example_listener`
36+
* `path_route_set_name` - (Optional) The name of the set of path-based routing rules, [PathRouteSet](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/PathRouteSet/), applied to this listener's traffic. Example: `example_path_route_set`
3537
* `port` - (Required) The communication port for the listener. Example: `80`
3638
* `protocol` - (Required) The protocol on which the listener accepts connection requests. To get a list of valid protocols, use the [ListProtocols](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/LoadBalancerProtocol/ListProtocols) operation. Example: `HTTP`
3739
* `ssl_configuration` - (Optional)
38-
* `certificate_name` - (Required) A friendly name for the certificate bundle. It must be unique and it cannot be changed. Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. Certificate bundle names cannot contain spaces. Avoid entering confidential information. Example: `My_certificate_bundle`
40+
* `certificate_name` - (Required) A friendly name for the certificate bundle. It must be unique and it cannot be changed. Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. Certificate bundle names cannot contain spaces. Avoid entering confidential information. Example: `example_certificate_bundle`
3941
* `verify_depth` - (Optional) The maximum depth for peer certificate chain verification. Example: `3`
4042
* `verify_peer_certificate` - (Optional) Whether the load balancer listener should verify peer certificates. Example: `true`
4143

@@ -45,13 +47,14 @@ Updates a listener for a given load balancer.
4547

4648
The following arguments support updates:
4749
* `connection_configuration` -
48-
* `idle_timeout_in_seconds` - The maximum idle time, in seconds, allowed between two successive receive or two successive send operations between the client and backend servers. A send operation does not reset the timer for receive operations. A receive operation does not reset the timer for send operations. The default values are: * 300 seconds for TCP * 60 seconds for HTTP and WebSocket protocols. Note: The protocol is set at the listener. Modify this parameter if the client or backend server stops transmitting data for more than the default time. Some examples include: * The client sends a database query to the backend server and the database takes over 300 seconds to execute. Therefore, the backend server does not transmit any data within 300 seconds. * The client uploads data using the HTTP protocol. During the upload, the backend does not transmit any data to the client for more than 60 seconds. * The client downloads data using the HTTP protocol. After the initial request, it stops transmitting data to the backend server for more than 60 seconds. * The client starts transmitting data after establishing a WebSocket connection, but the backend server does not transmit data for more than 60 seconds. * The backend server starts transmitting data after establishing a WebSocket connection, but the client does not transmit data for more than 60 seconds. The maximum value is 7200 seconds. Contact My Oracle Support to file a service request if you want to increase this limit for your tenancy. For more information, see [Service Limits](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). Example: `1200`
49-
* `default_backend_set_name` - The name of the associated backend set. Example: `My_backend_set`
50-
* `path_route_set_name` - The name of the set of path-based routing rules, [PathRouteSet](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/PathRouteSet/), applied to this listener's traffic. Example: `path-route-set-001`
50+
* `idle_timeout_in_seconds` - The maximum idle time, in seconds, allowed between two successive receive or two successive send operations between the client and backend servers. A send operation does not reset the timer for receive operations. A receive operation does not reset the timer for send operations. For more information, see [Connection Configuration](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/connectionreuse.htm#ConnectionConfiguration). Example: `1200`
51+
* `default_backend_set_name` - The name of the associated backend set. Example: `example_backend_set`
52+
* `hostname_names` - An array of hostname resource names.
53+
* `path_route_set_name` - The name of the set of path-based routing rules, [PathRouteSet](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/PathRouteSet/), applied to this listener's traffic. Example: `example_path_route_set`
5154
* `port` - The communication port for the listener. Example: `80`
5255
* `protocol` - The protocol on which the listener accepts connection requests. To get a list of valid protocols, use the [ListProtocols](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/LoadBalancerProtocol/ListProtocols) operation. Example: `HTTP`
5356
* `ssl_configuration` -
54-
* `certificate_name` - A friendly name for the certificate bundle. It must be unique and it cannot be changed. Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. Certificate bundle names cannot contain spaces. Avoid entering confidential information. Example: `My_certificate_bundle`
57+
* `certificate_name` - A friendly name for the certificate bundle. It must be unique and it cannot be changed. Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. Certificate bundle names cannot contain spaces. Avoid entering confidential information. Example: `example_certificate_bundle`
5558
* `verify_depth` - The maximum depth for peer certificate chain verification. Example: `3`
5659
* `verify_peer_certificate` - Whether the load balancer listener should verify peer certificates. Example: `true`
5760

@@ -75,6 +78,7 @@ resource "oci_load_balancer_listener" "test_listener" {
7578
#Required
7679
idle_timeout_in_seconds = "${var.listener_connection_configuration_idle_timeout_in_seconds}"
7780
}
81+
hostname_names = hostname_names = ["${oci_load_balancer_hostname.test_hostname.name}"]
7882
path_route_set_name = "${var.listener_path_route_set_name}"
7983
ssl_configuration {
8084
#Required

0 commit comments

Comments
 (0)