diff --git a/go.mod b/go.mod index c366312ab9..97b065979b 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/IBM/scc-go-sdk/v3 v3.1.6 github.com/IBM/schematics-go-sdk v0.1.3 github.com/IBM/secrets-manager-go-sdk v0.1.19 - github.com/IBM/vpc-go-sdk v0.17.0 + github.com/IBM/vpc-go-sdk v0.19.0 github.com/PromonLogicalis/asn1 v0.0.0-20190312173541-d60463189a56 // indirect github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5 github.com/Shopify/sarama v1.29.1 diff --git a/go.sum b/go.sum index 75580a4c56..f4f2fb561f 100644 --- a/go.sum +++ b/go.sum @@ -102,6 +102,8 @@ github.com/IBM/secrets-manager-go-sdk v0.1.19 h1:0GPs5EoTaWNsjo4QPj64GNxlWfN8VHJ github.com/IBM/secrets-manager-go-sdk v0.1.19/go.mod h1:eO3dBhzPrHkkt+yPex/jB2xD6qHZxBko+Aw+0tfqHeA= github.com/IBM/vpc-go-sdk v0.17.0 h1:H9qsEx1UJoAR79s1R7n3bGPdOPW6+wLNEUyCjnesaxs= github.com/IBM/vpc-go-sdk v0.17.0/go.mod h1:+fTuJIR/SWXru/B5XEANwV4GCLV5fRppFEzlYGwGm7k= +github.com/IBM/vpc-go-sdk v0.19.0 h1:f6fqF4W1h3dtAk+U8XLEUv1lPZ8jnvRoEFkTgOBPw8Q= +github.com/IBM/vpc-go-sdk v0.19.0/go.mod h1:KCdyxbJdWtN4pyWC1SqLH0Jk/y4ed8nv9gZb4ZxfepQ= github.com/Logicalis/asn1 v0.0.0-20190312173541-d60463189a56 h1:vuquMR410psHNax14XKNWa0Ae/kYgWJcXi0IFuX60N0= github.com/Logicalis/asn1 v0.0.0-20190312173541-d60463189a56/go.mod h1:Zb3OT4l0mf7P/GOs2w2Ilj5sdm5Whoq3pa24dAEBHFc= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= diff --git a/ibm/service/vpc/data_source_ibm_is_lb.go b/ibm/service/vpc/data_source_ibm_is_lb.go index 9e79dc97eb..fb00951501 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb.go +++ b/ibm/service/vpc/data_source_ibm_is_lb.go @@ -51,6 +51,12 @@ func DataSourceIBMISLB() *schema.Resource { Description: "Load Balancer type", }, + isLBUdpSupported: { + Type: schema.TypeBool, + Computed: true, + Description: "Indicates whether this load balancer supports UDP.", + }, + isLBStatus: { Type: schema.TypeString, Computed: true, @@ -295,6 +301,9 @@ func lbGetByName(d *schema.ResourceData, meta interface{}, name string) error { if lb.RouteMode != nil { d.Set(isLBRouteMode, *lb.RouteMode) } + if lb.UDPSupported != nil { + d.Set(isLBUdpSupported, *lb.UDPSupported) + } d.Set(isLBCrn, *lb.CRN) d.Set(isLBOperatingStatus, *lb.OperatingStatus) publicIpList := make([]string, 0) diff --git a/ibm/service/vpc/data_source_ibm_is_lb_profiles.go b/ibm/service/vpc/data_source_ibm_is_lb_profiles.go index 378ae9fb29..9b543deacd 100644 --- a/ibm/service/vpc/data_source_ibm_is_lb_profiles.go +++ b/ibm/service/vpc/data_source_ibm_is_lb_profiles.go @@ -54,6 +54,16 @@ func DataSourceIBMISLbProfiles() *schema.Resource { Computed: true, Description: "The route mode type for this load balancer profile, one of [fixed, dependent]", }, + "udp_supported": { + Type: schema.TypeBool, + Computed: true, + Description: "The UDP support for a load balancer with this profile", + }, + "udp_supported_type": { + Type: schema.TypeString, + Computed: true, + Description: "The UDP support type for a load balancer with this profile", + }, }, }, }, @@ -92,6 +102,34 @@ func dataSourceIBMISLbProfilesRead(d *schema.ResourceData, meta interface{}) err "href": *profileCollector.Href, "family": *profileCollector.Family, } + if profileCollector.UDPSupported != nil { + udpSupport := profileCollector.UDPSupported + switch reflect.TypeOf(udpSupport).String() { + case "*vpcv1.LoadBalancerProfileUDPSupportedFixed": + { + udp := udpSupport.(*vpcv1.LoadBalancerProfileUDPSupportedFixed) + l["udp_supported"] = udp.Value + l["udp_supported_type"] = udp.Type + } + case "*vpcv1.LoadBalancerProfileUDPSupportedDependent": + { + udp := udpSupport.(*vpcv1.LoadBalancerProfileUDPSupportedDependent) + if udp.Type != nil { + l["udp_supported_type"] = *udp.Type + } + } + case "*vpcv1.LoadBalancerProfileUDPSupported": + { + udp := udpSupport.(*vpcv1.LoadBalancerProfileUDPSupported) + if udp.Type != nil { + l["udp_supported_type"] = *udp.Type + } + if udp.Value != nil { + l["udp_supported"] = *udp.Value + } + } + } + } if profileCollector.RouteModeSupported != nil { routeMode := profileCollector.RouteModeSupported switch reflect.TypeOf(routeMode).String() { diff --git a/ibm/service/vpc/data_source_ibm_is_lbs.go b/ibm/service/vpc/data_source_ibm_is_lbs.go index 3ce73f7ce9..7def3f5df0 100644 --- a/ibm/service/vpc/data_source_ibm_is_lbs.go +++ b/ibm/service/vpc/data_source_ibm_is_lbs.go @@ -56,6 +56,11 @@ func DataSourceIBMISLBS() *schema.Resource { Computed: true, Description: "Load Balancer name", }, + isLBUdpSupported: { + Type: schema.TypeBool, + Computed: true, + Description: "Indicates whether this load balancer supports UDP.", + }, isLBRouteMode: { Type: schema.TypeBool, Computed: true, @@ -260,6 +265,9 @@ func getLbs(d *schema.ResourceData, meta interface{}) error { if lb.RouteMode != nil { lbInfo[isLBRouteMode] = *lb.RouteMode } + if lb.UDPSupported != nil { + lbInfo[isLBUdpSupported] = *lb.UDPSupported + } lbInfo[CRN] = *lb.CRN lbInfo[ProvisioningStatus] = *lb.ProvisioningStatus diff --git a/ibm/service/vpc/resource_ibm_is_instance.go b/ibm/service/vpc/resource_ibm_is_instance.go index 5569e973af..9f2068b262 100644 --- a/ibm/service/vpc/resource_ibm_is_instance.go +++ b/ibm/service/vpc/resource_ibm_is_instance.go @@ -1326,7 +1326,7 @@ func instanceCreateByVolume(d *schema.ResourceData, meta interface{}, profile, n if err != nil { return err } - instanceproto := &vpcv1.InstancePrototypeInstanceByVolume{ + instanceproto := &vpcv1.InstancePrototypeInstanceBySourceSnapshot{ Zone: &vpcv1.ZoneIdentity{ Name: &zone, }, @@ -1380,7 +1380,7 @@ func instanceCreateByVolume(d *schema.ResourceData, meta interface{}, profile, n if boot, ok := d.GetOk(isInstanceBootVolume); ok { bootvol := boot.([]interface{})[0].(map[string]interface{}) - var volTemplate = &vpcv1.VolumeAttachmentVolumePrototypeInstanceByVolumeContext{} + var volTemplate = &vpcv1.VolumePrototypeInstanceBySourceSnapshotContext{} name, ok := bootvol[isInstanceBootAttachmentName] namestr := name.(string) @@ -1413,7 +1413,7 @@ func instanceCreateByVolume(d *schema.ResourceData, meta interface{}, profile, n } } deletebool := true - instanceproto.BootVolumeAttachment = &vpcv1.VolumeAttachmentPrototypeInstanceByVolumeContext{ + instanceproto.BootVolumeAttachment = &vpcv1.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext{ DeleteVolumeOnInstanceDelete: &deletebool, Volume: volTemplate, } diff --git a/ibm/service/vpc/resource_ibm_is_lb.go b/ibm/service/vpc/resource_ibm_is_lb.go index 6f1380a6e6..9362ff4f39 100644 --- a/ibm/service/vpc/resource_ibm_is_lb.go +++ b/ibm/service/vpc/resource_ibm_is_lb.go @@ -38,6 +38,7 @@ const ( isLBResourceGroup = "resource_group" isLBProfile = "profile" isLBRouteMode = "route_mode" + isLBUdpSupported = "udp_supported" isLBLogging = "logging" isLBSecurityGroups = "security_groups" isLBSecurityGroupsSupported = "security_group_supported" @@ -175,6 +176,12 @@ func ResourceIBMISLB() *schema.Resource { Description: "Indicates whether route mode is enabled for this load balancer", }, + isLBUdpSupported: { + Type: schema.TypeBool, + Computed: true, + Description: "Indicates whether this load balancer supports UDP.", + }, + isLBHostName: { Type: schema.TypeString, Computed: true, @@ -469,6 +476,9 @@ func lbGet(d *schema.ResourceData, meta interface{}, id string) error { d.Set(isLBResourceGroup, *lb.ResourceGroup.ID) d.Set(isLBHostName, *lb.Hostname) + if lb.UDPSupported != nil { + d.Set(isLBUdpSupported, *lb.UDPSupported) + } tags, err := flex.GetTagsUsingCRN(meta, *lb.CRN) if err != nil { log.Printf( diff --git a/ibm/service/vpc/resource_ibm_is_lb_listener.go b/ibm/service/vpc/resource_ibm_is_lb_listener.go index 51f93ac2d3..9e8cf6181c 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_listener.go +++ b/ibm/service/vpc/resource_ibm_is_lb_listener.go @@ -176,7 +176,7 @@ func ResourceIBMISLBListener() *schema.Resource { func ResourceIBMISLBListenerValidator() *validate.ResourceValidator { validateSchema := make([]validate.ValidateSchema, 0) - protocol := "https, http, tcp" + protocol := "https, http, tcp, udp" validateSchema = append(validateSchema, validate.ValidateSchema{ Identifier: isLBListenerProtocol, diff --git a/ibm/service/vpc/resource_ibm_is_lb_listener_test.go b/ibm/service/vpc/resource_ibm_is_lb_listener_test.go index 1980b2b702..18c7a13628 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_listener_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_listener_test.go @@ -69,6 +69,35 @@ func TestAccIBMISLBListener_basic(t *testing.T) { }, }) } +func TestAccIBMISLBListener_basic_udp(t *testing.T) { + var lb string + vpcname := fmt.Sprintf("tflblis-vpc-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tflblis-subnet-%d", acctest.RandIntRange(10, 100)) + lbname := fmt.Sprintf("tflblis%d", acctest.RandIntRange(10, 100)) + + protocol1 := "udp" + port1 := "8080" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISLBListenerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISLBUdpListenerConfig(vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, lbname, port1, protocol1), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISLBListenerExists("ibm_is_lb_listener.testacc_lb_listener", lb), + resource.TestCheckResourceAttr( + "ibm_is_lb.testacc_LB", "name", lbname), + resource.TestCheckResourceAttr( + "ibm_is_lb_listener.testacc_lb_listener", "port", port1), + resource.TestCheckResourceAttr( + "ibm_is_lb_listener.testacc_lb_listener", "protocol", protocol1), + ), + }, + }, + }) +} func TestAccIBMISNLBRouteModeListener_basic(t *testing.T) { var lb string vpcname := fmt.Sprintf("tflblis-vpc-%d", acctest.RandIntRange(10, 100)) @@ -248,6 +277,31 @@ func testAccCheckIBMISLBListenerConfig(vpcname, subnetname, zone, cidr, lbname, accept_proxy_protocol = true }`, vpcname, subnetname, zone, cidr, lbname, port, protocol) +} +func testAccCheckIBMISLBUdpListenerConfig(vpcname, subnetname, zone, cidr, lbname, port, protocol string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = "${ibm_is_vpc.testacc_vpc.id}" + zone = "%s" + ipv4_cidr_block = "%s" + } + resource "ibm_is_lb" "testacc_LB" { + name = "%s" + subnets = ["${ibm_is_subnet.testacc_subnet.id}"] + profile = "network-fixed" + type = "public" + } + resource "ibm_is_lb_listener" "testacc_lb_listener" { + lb = "${ibm_is_lb.testacc_LB.id}" + port = %s + protocol = "%s" + }`, vpcname, subnetname, zone, cidr, lbname, port, protocol) + } func testAccCheckIBMISLBListenerHttpsRedirectConfig(vpcname, subnetname, zone, cidr, lbname, port, protocol string) string { diff --git a/ibm/service/vpc/resource_ibm_is_lb_pool.go b/ibm/service/vpc/resource_ibm_is_lb_pool.go index 756dfeddc9..29a2efbddb 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_pool.go +++ b/ibm/service/vpc/resource_ibm_is_lb_pool.go @@ -186,7 +186,7 @@ func ResourceIBMISLBPoolValidator() *validate.ResourceValidator { validateSchema := make([]validate.ValidateSchema, 0) algorithm := "round_robin, weighted_round_robin, least_connections" - protocol := "http, tcp, https" + protocol := "http, tcp, https, udp" persistanceType := "source_ip, app_cookie, http_cookie" proxyProtocol := "disabled, v1, v2" validateSchema = append(validateSchema, diff --git a/ibm/service/vpc/resource_ibm_is_lb_pool_test.go b/ibm/service/vpc/resource_ibm_is_lb_pool_test.go index 4c491bd1b9..f5baeb13a9 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_pool_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_pool_test.go @@ -120,6 +120,49 @@ func TestAccIBMISLBPool_basic(t *testing.T) { }, }) } +func TestAccIBMISLBPool_basic_udp(t *testing.T) { + var lb string + vpcname := fmt.Sprintf("tflbp-vpc-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tflbpc-name-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tfcreate%d", acctest.RandIntRange(10, 100)) + poolName := fmt.Sprintf("tflbpoolc%d", acctest.RandIntRange(10, 100)) + alg1 := "round_robin" + protocol1 := "udp" + delay1 := "5" + retries1 := "2" + timeout1 := "2" + healthType1 := "http" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISLBPoolDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISLBPoolUdpConfig(vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, name, poolName, alg1, protocol1, delay1, retries1, timeout1, healthType1), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISLBPoolExists("ibm_is_lb_pool.testacc_lb_pool", lb), + resource.TestCheckResourceAttr( + "ibm_is_lb.testacc_LB", "name", name), + resource.TestCheckResourceAttr( + "ibm_is_lb_pool.testacc_lb_pool", "name", poolName), + resource.TestCheckResourceAttr( + "ibm_is_lb_pool.testacc_lb_pool", "algorithm", alg1), + resource.TestCheckResourceAttr( + "ibm_is_lb_pool.testacc_lb_pool", "protocol", protocol1), + resource.TestCheckResourceAttr( + "ibm_is_lb_pool.testacc_lb_pool", "health_delay", delay1), + resource.TestCheckResourceAttr( + "ibm_is_lb_pool.testacc_lb_pool", "health_retries", retries1), + resource.TestCheckResourceAttr( + "ibm_is_lb_pool.testacc_lb_pool", "health_timeout", timeout1), + resource.TestCheckResourceAttr( + "ibm_is_lb_pool.testacc_lb_pool", "health_type", healthType1), + ), + }, + }, + }) +} func TestAccIBMISLBPool_port(t *testing.T) { var lb string @@ -376,6 +419,37 @@ func testAccCheckIBMISLBPoolConfig(vpcname, subnetname, zone, cidr, name, poolNa health_type = "%s" }`, vpcname, subnetname, zone, cidr, name, poolName, algorithm, protocol, delay, retries, timeout, healthType) +} +func testAccCheckIBMISLBPoolUdpConfig(vpcname, subnetname, zone, cidr, name, poolName, algorithm, protocol, delay, retries, timeout, healthType string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = "${ibm_is_vpc.testacc_vpc.id}" + zone = "%s" + ipv4_cidr_block = "%s" + } + resource "ibm_is_lb" "testacc_LB" { + name = "%s" + subnets = ["${ibm_is_subnet.testacc_subnet.id}"] + profile = "network-fixed" + type = "public" + } + resource "ibm_is_lb_pool" "testacc_lb_pool" { + name = "%s" + lb = "${ibm_is_lb.testacc_LB.id}" + algorithm = "%s" + protocol = "%s" + health_delay = %s + health_retries = %s + health_timeout = %s + health_type = "%s" + health_monitor_url = "/" +}`, vpcname, subnetname, zone, cidr, name, poolName, algorithm, protocol, delay, retries, timeout, healthType) + } func testAccCheckIBMISLBPoolPortConfig(vpcname, subnetname, zone, cidr, name, poolName, algorithm, protocol, delay, retries, timeout, healthType, port string) string { diff --git a/ibm/service/vpc/resource_ibm_is_lb_test.go b/ibm/service/vpc/resource_ibm_is_lb_test.go index 7464594a49..007f04ec20 100644 --- a/ibm/service/vpc/resource_ibm_is_lb_test.go +++ b/ibm/service/vpc/resource_ibm_is_lb_test.go @@ -51,6 +51,48 @@ func TestAccIBMISLB_basic(t *testing.T) { }, }) } +func TestAccIBMISLB_basic_udp(t *testing.T) { + var lb string + vpcname := fmt.Sprintf("tflb-vpc-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tflb-subnet-name-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tfcreate%d", acctest.RandIntRange(10, 100)) + name1 := fmt.Sprintf("tfupdate%d", acctest.RandIntRange(10, 100)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISLBDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISLBUdpConfig(vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, name), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISLBExists("ibm_is_lb.testacc_LB", lb), + resource.TestCheckResourceAttr( + "ibm_is_lb.testacc_LB", "name", name), + resource.TestCheckResourceAttrSet( + "ibm_is_lb.testacc_LB", "hostname"), + resource.TestCheckResourceAttr( + "ibm_is_lb.testacc_LB", "udp_supported", "true"), + resource.TestCheckResourceAttrSet( + "ibm_is_lb.testacc_LB", "udp_supported"), + ), + }, + + { + Config: testAccCheckIBMISLBUdpConfig(vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, name1), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISLBExists("ibm_is_lb.testacc_LB", lb), + resource.TestCheckResourceAttr( + "ibm_is_lb.testacc_LB", "name", name1), + resource.TestCheckResourceAttr( + "ibm_is_lb.testacc_LB", "udp_supported", "true"), + resource.TestCheckResourceAttrSet( + "ibm_is_lb.testacc_LB", "udp_supported"), + ), + }, + }, + }) +} func TestAccIBMISLB_basic_logging(t *testing.T) { var lb string @@ -285,6 +327,27 @@ func testAccCheckIBMISLBConfig(vpcname, subnetname, zone, cidr, name string) str } +func testAccCheckIBMISLBUdpConfig(vpcname, subnetname, zone, cidr, name string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + ipv4_cidr_block = "%s" + } + resource "ibm_is_lb" "testacc_LB" { + name = "%s" + subnets = [ibm_is_subnet.testacc_subnet.id] + profile = "network-fixed" + type = "public" +}`, vpcname, subnetname, zone, cidr, name) + +} + func testAccCheckIBMISLBLoggingCongig(vpcname, subnetname, zone, cidr, name string) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { diff --git a/website/docs/d/is_lb.html.markdown b/website/docs/d/is_lb.html.markdown index fa8de6c120..05dbfa2c11 100644 --- a/website/docs/d/is_lb.html.markdown +++ b/website/docs/d/is_lb.html.markdown @@ -102,3 +102,4 @@ In addition to all argument reference list, you can access the following attribu - `status` - (String) The status of load balancer. - `tags` - (String) The tags associated with the load balancer. - `type` - (String) The type of the load balancer. +- `udp_supported`- (Bool) Indicates whether this load balancer supports UDP. diff --git a/website/docs/d/is_lb_listener.html.markdown b/website/docs/d/is_lb_listener.html.markdown index c69d633299..74bf6d81c4 100644 --- a/website/docs/d/is_lb_listener.html.markdown +++ b/website/docs/d/is_lb_listener.html.markdown @@ -77,6 +77,6 @@ Nested scheme for `policies`: - `port_min` - (Integer) The inclusive lower bound of the range of ports used by this listener.Only load balancers in the `network` family support more than one port per listener. -- `protocol` - (String) The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application` family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and `protocol` combination. +- `protocol` - (String) The listener protocol. Load balancers in the `network` family support `tcp` and `udp`. Load balancers in the `application` family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and `protocol` combination. - `provisioning_status` - (String) The provisioning status of this listener. diff --git a/website/docs/d/is_lb_listeners.html.markdown b/website/docs/d/is_lb_listeners.html.markdown index 731600b355..6c55deeaad 100644 --- a/website/docs/d/is_lb_listeners.html.markdown +++ b/website/docs/d/is_lb_listeners.html.markdown @@ -66,5 +66,5 @@ In addition to all argument references listed, you can access the following attr - `port` - (Integer) The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must have a unique `port` and `protocol` combination. - `port_max` - (Integer) The inclusive upper bound of the range of ports used by this listener.Only load balancers in the `network` family support more than one port per listener. - `port_min` - (Integer) The inclusive lower bound of the range of ports used by this listener.Only load balancers in the `network` family support more than one port per listener. - - `protocol` - (String) The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application` family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and `protocol` combination. + - `protocol` - (String) The listener protocol. Load balancers in the `network` family support `tcp` and `udp`. Load balancers in the `application` family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and `protocol` combination. - `provisioning_status` - (String) The provisioning status of this listener. diff --git a/website/docs/d/is_lb_profiles.html.markdown b/website/docs/d/is_lb_profiles.html.markdown index 0cc7eaa2b4..1502a5dbd1 100644 --- a/website/docs/d/is_lb_profiles.html.markdown +++ b/website/docs/d/is_lb_profiles.html.markdown @@ -40,3 +40,6 @@ You can access the following attribute references after your data source is crea - `name` - (String) The name for this load balancer profile. - `route_mode_supported` - (Bool) The route mode support for a load balancer with this profile. - `route_mode_type` - (String) The route mode type for this load balancer profile, one of [fixed, dependent] + - `udp_supported` - (Bool) The UDP support for a load balancer with this profile. + - `udp_supported_type` - (String) TThe UDP support type for a load balancer with this profile, one of [fixed, dependent] + diff --git a/website/docs/d/is_lbs.html.markdown b/website/docs/d/is_lbs.html.markdown index acccf1a7b0..d054269d72 100644 --- a/website/docs/d/is_lbs.html.markdown +++ b/website/docs/d/is_lbs.html.markdown @@ -72,3 +72,4 @@ Review the attribute references that you can access after you retrieve your data - `status` - (String) The status of the load balancers. - `type` - (String) The type of the load balancer. - `tags` - (String) Tags associated with the load balancer. + - `udp_supported`- (Bool) Indicates whether this load balancer supports UDP. diff --git a/website/docs/r/is_lb.html.markdown b/website/docs/r/is_lb.html.markdown index f80f6141d0..e34f43beda 100644 --- a/website/docs/r/is_lb.html.markdown +++ b/website/docs/r/is_lb.html.markdown @@ -76,6 +76,7 @@ In addition to all argument reference list, you can access the following attribu - `private_ips` - (String) The private IP addresses assigned to this load balancer. - `status` - (String) The status of the load balancer. - `security_groups_supported`- (Bool) Indicates if this load balancer supports security groups. +- `udp_supported`- (Bool) Indicates whether this load balancer supports UDP. ## Import diff --git a/website/docs/r/is_lb_listener.html.markdown b/website/docs/r/is_lb_listener.html.markdown index 6460479300..5e155daed5 100644 --- a/website/docs/r/is_lb_listener.html.markdown +++ b/website/docs/r/is_lb_listener.html.markdown @@ -131,7 +131,7 @@ Review the argument references that you can specify for your resource. - Private network load balancers with `route_mode` enabled don't support `port`, they support `port` range from `port_min`(1) - `port_max`(65535). - Only accepted value of `port` for `route_mode` enabled private network load balancer is `1`. Any other value will show change or update-in-place and returns an error. -- `protocol` - (Required, String) The listener protocol. Enumeration type are `http`, `tcp`, and `https`. Network load balancer supports only `tcp` protocol. +- `protocol` - (Required, String) The listener protocol. Enumeration type are `http`, `tcp`, `https` and `udp`. Network load balancer supports only `tcp` and `udp` protocol. - `default_pool` - (Optional, String) The load balancer pool unique identifier. - `certificate_instance` - (Optional, String) The CRN of the certificate instance, it is applicable(mandatory) only to https protocol. - `connection_limit` - (Optional, Integer) The connection limit of the listener. Valid range is **1 to 15000**. Network load balancer do not support `connection_limit` argument. diff --git a/website/docs/r/is_lb_pool.html.markdown b/website/docs/r/is_lb_pool.html.markdown index a02ee16244..d8da0d9153 100644 --- a/website/docs/r/is_lb_pool.html.markdown +++ b/website/docs/r/is_lb_pool.html.markdown @@ -130,7 +130,7 @@ Review the argument references that you can specify for your resource. - `health_monitor_port` - (Optional, Integer) The health check port number. - `lb` - (Required, Forces new resource, String) The load balancer unique identifier. - `name` - (Required, String) The name of the pool. -- `protocol` - (Required, String) The pool protocol. Enumeration type: `http`, `https`, `tcp` are supported. +- `protocol` - (Required, String) The pool protocol. Enumeration type: `http`, `https`, `tcp`, `udp` are supported. - `proxy_protocol` - (Optional, String) The proxy protocol setting for the pool that is supported by the load balancers in the application family. Valid values are `disabled`, `v1`, and `v2`. Default value is `disabled`. - `session_persistence_type` - (Optional, String) The session persistence type, Enumeration type: source_ip, app_cookie, http_cookie - `session_persistence_app_cookie_name` - (Optional, String) Session persistence app cookie name. This is applicable only to app_cookie type.