Skip to content

Commit d2fa944

Browse files
varigelaMonica Joshi
authored andcommitted
Added - Support for BYoIPv6 support on LBaaS (API ONLY Release)
1 parent 0d9cbd5 commit d2fa944

9 files changed

+50
-12
lines changed

internal/integrationtest/load_balancer_load_balancer_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ var (
5353
// "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
5454

5555
"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}},
56+
"ipv6subnet_cidr": acctest.Representation{RepType: acctest.Optional, Create: `ipv6SubnetCidr`},
5657
"is_private": acctest.Representation{RepType: acctest.Optional, Create: `false`},
5758
"security_attributes": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"oracle-zpr.sa-test-lbaas.mode": "enforce", "oracle-zpr.sa-test-lbaas.value": "create-zpr-tersi-lbaas"}, Update: map[string]string{"oracle-zpr.sa-test-lbaas.value": "update-zpr-tersi-lbaas", "oracle-zpr.sa-test-lbaas.mode": "enforce"}},
5859
"is_request_id_enabled": acctest.Representation{RepType: acctest.Optional, Create: `true`, Update: `true`},
@@ -207,6 +208,7 @@ func TestLoadBalancerLoadBalancerResource_basic(t *testing.T) {
207208
resource.TestCheckResourceAttr(resourceName, "display_name", "example_load_balancer"),
208209
resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"),
209210
resource.TestCheckResourceAttrSet(resourceName, "id"),
211+
resource.TestCheckResourceAttr(resourceName, "ipv6subnet_cidr", "ipv6SubnetCidr"),
210212
resource.TestCheckResourceAttr(resourceName, "is_delete_protection_enabled", "false"),
211213
resource.TestCheckResourceAttr(resourceName, "is_private", "false"),
212214
resource.TestCheckResourceAttr(resourceName, "is_request_id_enabled", "true"),
@@ -246,6 +248,7 @@ func TestLoadBalancerLoadBalancerResource_basic(t *testing.T) {
246248
resource.TestCheckResourceAttr(resourceName, "display_name", "example_load_balancer"),
247249
resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"),
248250
resource.TestCheckResourceAttrSet(resourceName, "id"),
251+
resource.TestCheckResourceAttr(resourceName, "ipv6subnet_cidr", "ipv6SubnetCidr"),
249252
resource.TestCheckResourceAttr(resourceName, "is_delete_protection_enabled", "false"),
250253
resource.TestCheckResourceAttr(resourceName, "is_private", "false"),
251254
resource.TestCheckResourceAttr(resourceName, "is_request_id_enabled", "true"),
@@ -278,6 +281,7 @@ func TestLoadBalancerLoadBalancerResource_basic(t *testing.T) {
278281
resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"),
279282
resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"),
280283
resource.TestCheckResourceAttrSet(resourceName, "id"),
284+
resource.TestCheckResourceAttr(resourceName, "ipv6subnet_cidr", "ipv6SubnetCidr"),
281285
resource.TestCheckResourceAttr(resourceName, "is_delete_protection_enabled", "true"),
282286
resource.TestCheckResourceAttr(resourceName, "is_private", "false"),
283287
resource.TestCheckResourceAttr(resourceName, "is_request_id_enabled", "true"),
@@ -339,6 +343,7 @@ func TestLoadBalancerLoadBalancerResource_basic(t *testing.T) {
339343
ImportStateVerify: true,
340344
ImportStateVerifyIgnore: []string{
341345
"ip_mode",
346+
"ipv6subnet_cidr",
342347
"reserved_ips",
343348
},
344349
ResourceName: resourceName,

internal/service/load_balancer/load_balancer_load_balancer_resource.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ func LoadBalancerLoadBalancerResource() *schema.Resource {
6969
Computed: true,
7070
ForceNew: true,
7171
},
72+
"ipv6subnet_cidr": {
73+
Type: schema.TypeString,
74+
Optional: true,
75+
Computed: true,
76+
},
7277
"is_delete_protection_enabled": {
7378
Type: schema.TypeBool,
7479
Optional: true,
@@ -325,6 +330,11 @@ func (s *LoadBalancerLoadBalancerResourceCrud) Create() error {
325330
request.IpMode = oci_load_balancer.CreateLoadBalancerDetailsIpModeEnum(ipMode.(string))
326331
}
327332

333+
if ipv6SubnetCidr, ok := s.D.GetOkExists("ipv6subnet_cidr"); ok {
334+
tmp := ipv6SubnetCidr.(string)
335+
request.Ipv6SubnetCidr = &tmp
336+
}
337+
328338
if isDeleteProtectionEnabled, ok := s.D.GetOkExists("is_delete_protection_enabled"); ok {
329339
tmp := isDeleteProtectionEnabled.(bool)
330340
request.IsDeleteProtectionEnabled = &tmp

website/docs/d/load_balancer_backend_sets.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ The following attributes are exported:
5050
Example: `false`
5151
* `drain` - Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: `false`
5252
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
53-
* `max_connections` - The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
53+
* `max_connections` - The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set or set to 0 then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
5454
* `name` - A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`
5555
* `offline` - Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
5656
* `port` - The communication port for the backend server. Example: `8080`
5757
* `weight` - The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see [How Load Balancing Policies Work](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/lbpolicies.htm). Example: `3`
58-
* `backend_max_connections` - The maximum number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting. If this is not set then the number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting is unlimited. Example: `300`
58+
* `backend_max_connections` - The maximum number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting. If this is not set or set to 0 then the number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting is unlimited. Example: `300`
5959
* `health_checker` - The health check policy configuration. For more information, see [Editing Health Check Policies](https://docs.cloud.oracle.com/iaas/Content/Balance/Tasks/editinghealthcheck.htm).
6060
* `interval_ms` - The interval between health checks, in milliseconds. The default is 10000 (10 seconds). Example: `10000`
6161
* `is_force_plain_text` - Specifies if health checks should always be done using plain text instead of depending on whether or not the associated backend set is using SSL.

website/docs/d/load_balancer_backends.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The following attributes are exported:
4747
Example: `false`
4848
* `drain` - Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: `false`
4949
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
50-
* `max_connections` - The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
50+
* `max_connections` - The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set or set to 0 then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
5151
* `name` - A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`
5252
* `offline` - Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
5353
* `port` - The communication port for the backend server. Example: `8080`

website/docs/d/load_balancer_load_balancers.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ The following attributes are exported:
7373

7474
Example: "ocid1.publicip.oc1.phx.unique_ID"
7575
* `ip_addresses` - An array of IP addresses. Deprecated: use ip_address_details instead.
76+
7677
* `is_delete_protection_enabled` - Whether or not the load balancer has delete protection enabled.
7778

7879
If "true", the loadbalancer will be protected against deletion if configured to accept traffic.

website/docs/r/load_balancer_backend.html.markdown

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ The following arguments are supported:
4444
* `drain` - (Optional) (Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: `false`
4545
* `ip_address` - (Required) The IP address of the backend server. Example: `10.0.0.3`
4646
* `load_balancer_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and servers.
47-
* `max_connections` - (Optional) (Updatable) The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
47+
* `max_connections` - (Optional) (Updatable) The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set or set to 0 then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited.
48+
49+
If setting maxConnections to some value other than 0 then that value must be greater or equal to 256.
50+
51+
Example: `300`
4852
* `offline` - (Optional) (Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
4953
* `port` - (Required) The communication port for the backend server. Example: `8080`
5054
* `weight` - (Optional) (Updatable) The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see [How Load Balancing Policies Work](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/lbpolicies.htm). Example: `3`
@@ -64,7 +68,7 @@ The following attributes are exported:
6468
Example: `false`
6569
* `drain` - Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: `false`
6670
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
67-
* `max_connections` - The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
71+
* `max_connections` - The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set or set to 0 then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
6872
* `name` - A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`
6973
* `offline` - Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
7074
* `port` - The communication port for the backend server. Example: `8080`

website/docs/r/load_balancer_backend_set.html.markdown

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,19 @@ The following arguments are supported:
8989
Example: `false`
9090
* `drain` - (Optional) (Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: `false`
9191
* `ip_address` - (Required) (Updatable) The IP address of the backend server. Example: `10.0.0.3`
92-
* `max_connections` - (Optional) (Updatable) The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
92+
* `max_connections` - (Optional) (Updatable) The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set or set to 0 then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited.
93+
94+
If setting maxConnections to some value other than 0 then that value must be greater or equal to 256.
95+
96+
Example: `300`
9397
* `offline` - (Optional) (Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
9498
* `port` - (Required) (Updatable) The communication port for the backend server. Example: `8080`
9599
* `weight` - (Optional) (Updatable) The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see [How Load Balancing Policies Work](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/lbpolicies.htm). Example: `3`
96-
* `backend_max_connections` - (Optional) (Updatable) The maximum number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting. If this is not set then the number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting is unlimited. Example: `300`
100+
* `backend_max_connections` - (Optional) (Updatable) The maximum number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting. If this is not set or set to 0 then the number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting is unlimited.
101+
102+
If setting backendMaxConnections to some value other than 0 then that value must be greater or equal to 256.
103+
104+
Example: `300`
97105
* `health_checker` - (Required) (Updatable) The health check policy's configuration details.
98106
* `interval_ms` - (Optional) (Updatable) The interval between health checks, in milliseconds. Example: `10000`
99107
* `is_force_plain_text` - (Optional) (Updatable) Specifies if health checks should always be done using plain text instead of depending on whether or not the associated backend set is using SSL.
@@ -243,12 +251,12 @@ The following attributes are exported:
243251
Example: `false`
244252
* `drain` - Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: `false`
245253
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
246-
* `max_connections` - The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
254+
* `max_connections` - The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set or set to 0 then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: `300`
247255
* `name` - A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`
248256
* `offline` - Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
249257
* `port` - The communication port for the backend server. Example: `8080`
250258
* `weight` - The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see [How Load Balancing Policies Work](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/lbpolicies.htm). Example: `3`
251-
* `backend_max_connections` - The maximum number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting. If this is not set then the number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting is unlimited. Example: `300`
259+
* `backend_max_connections` - The maximum number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting. If this is not set or set to 0 then the number of simultaneous connections the load balancer can make to any backend in the backend set unless the backend has its own maxConnections setting is unlimited. Example: `300`
252260
* `health_checker` - The health check policy configuration. For more information, see [Editing Health Check Policies](https://docs.cloud.oracle.com/iaas/Content/Balance/Tasks/editinghealthcheck.htm).
253261
* `interval_ms` - The interval between health checks, in milliseconds. The default is 10000 (10 seconds). Example: `10000`
254262
* `is_force_plain_text` - Specifies if health checks should always be done using plain text instead of depending on whether or not the associated backend set is using SSL.

website/docs/r/load_balancer_listener.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The following arguments are supported:
7373

7474
Example: `example_path_route_set`
7575
* `port` - (Required) (Updatable) The communication port for the listener. Example: `80`
76-
* `protocol` - (Required) (Updatable) The protocol on which the listener accepts connection requests. The supported protocols are HTTP, HTTP2, TCP, and GRPC. You can also use the [ListProtocols](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/LoadBalancerProtocol/ListProtocols) operation to get a list of valid protocols. Example: `HTTP`
76+
* `protocol` - (Required) (Updatable) The protocol on which the listener accepts connection requests. To get a list of valid protocols, use the [ListProtocols](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/LoadBalancerProtocol/ListProtocols) operation. Example: `HTTP`
7777
* `routing_policy_name` - (Optional) (Updatable) The name of the routing policy applied to this listener's traffic. Example: `example_routing_policy`
7878
* `rule_set_names` - (Optional) (Updatable) The names of the [rule sets](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/RuleSet/) to apply to the listener. Example: ["example_rule_set"]
7979
* `ssl_configuration` - (Optional) (Updatable) The load balancer's SSL handling configuration details.

0 commit comments

Comments
 (0)