mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
remove loadBalancingScheme as an option in RegionBackendService since it can only be INTERNAL
This commit is contained in:
parent
fd2b1fcbd6
commit
0e03f59e4a
@ -70,12 +70,6 @@ func resourceComputeRegionBackendService() *schema.Resource {
|
|||||||
Computed: true,
|
Computed: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
"load_balancing_scheme": &schema.Schema{
|
|
||||||
Type: schema.TypeString,
|
|
||||||
Optional: true,
|
|
||||||
ForceNew: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
"project": &schema.Schema{
|
"project": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
@ -118,8 +112,9 @@ func resourceComputeRegionBackendServiceCreate(d *schema.ResourceData, meta inte
|
|||||||
}
|
}
|
||||||
|
|
||||||
service := compute.BackendService{
|
service := compute.BackendService{
|
||||||
Name: d.Get("name").(string),
|
Name: d.Get("name").(string),
|
||||||
HealthChecks: healthChecks,
|
HealthChecks: healthChecks,
|
||||||
|
LoadBalancingScheme: "INTERNAL",
|
||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := d.GetOk("backend"); ok {
|
if v, ok := d.GetOk("backend"); ok {
|
||||||
@ -138,10 +133,6 @@ func resourceComputeRegionBackendServiceCreate(d *schema.ResourceData, meta inte
|
|||||||
service.TimeoutSec = int64(v.(int))
|
service.TimeoutSec = int64(v.(int))
|
||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := d.GetOk("load_balancing_scheme"); ok {
|
|
||||||
service.LoadBalancingScheme = v.(string)
|
|
||||||
}
|
|
||||||
|
|
||||||
project, err := getProject(d, config)
|
project, err := getProject(d, config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -203,7 +194,6 @@ func resourceComputeRegionBackendServiceRead(d *schema.ResourceData, meta interf
|
|||||||
d.Set("protocol", service.Protocol)
|
d.Set("protocol", service.Protocol)
|
||||||
d.Set("timeout_sec", service.TimeoutSec)
|
d.Set("timeout_sec", service.TimeoutSec)
|
||||||
d.Set("fingerprint", service.Fingerprint)
|
d.Set("fingerprint", service.Fingerprint)
|
||||||
d.Set("load_balancing_scheme", service.LoadBalancingScheme)
|
|
||||||
d.Set("self_link", service.SelfLink)
|
d.Set("self_link", service.SelfLink)
|
||||||
|
|
||||||
d.Set("backend", flattenBackends(service.Backends))
|
d.Set("backend", flattenBackends(service.Backends))
|
||||||
@ -232,9 +222,10 @@ func resourceComputeRegionBackendServiceUpdate(d *schema.ResourceData, meta inte
|
|||||||
}
|
}
|
||||||
|
|
||||||
service := compute.BackendService{
|
service := compute.BackendService{
|
||||||
Name: d.Get("name").(string),
|
Name: d.Get("name").(string),
|
||||||
Fingerprint: d.Get("fingerprint").(string),
|
Fingerprint: d.Get("fingerprint").(string),
|
||||||
HealthChecks: healthChecks,
|
HealthChecks: healthChecks,
|
||||||
|
LoadBalancingScheme: "INTERNAL",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optional things
|
// Optional things
|
||||||
@ -251,10 +242,6 @@ func resourceComputeRegionBackendServiceUpdate(d *schema.ResourceData, meta inte
|
|||||||
service.TimeoutSec = int64(v.(int))
|
service.TimeoutSec = int64(v.(int))
|
||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := d.GetOk("load_balancing_scheme"); ok {
|
|
||||||
service.LoadBalancingScheme = v.(string)
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("[DEBUG] Updating existing Backend Service %q: %#v", d.Id(), service)
|
log.Printf("[DEBUG] Updating existing Backend Service %q: %#v", d.Id(), service)
|
||||||
op, err := config.clientCompute.RegionBackendServices.Update(
|
op, err := config.clientCompute.RegionBackendServices.Update(
|
||||||
project, region, d.Id(), &service).Do()
|
project, region, d.Id(), &service).Do()
|
||||||
|
@ -166,7 +166,6 @@ func testAccComputeRegionBackendService_basic(serviceName, checkName string) str
|
|||||||
resource "google_compute_region_backend_service" "foobar" {
|
resource "google_compute_region_backend_service" "foobar" {
|
||||||
name = "%s"
|
name = "%s"
|
||||||
health_checks = ["${google_compute_health_check.zero.self_link}"]
|
health_checks = ["${google_compute_health_check.zero.self_link}"]
|
||||||
load_balancing_scheme = "INTERNAL"
|
|
||||||
region = "us-central1"
|
region = "us-central1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +186,6 @@ func testAccComputeRegionBackendService_basicModified(serviceName, checkOne, che
|
|||||||
resource "google_compute_region_backend_service" "foobar" {
|
resource "google_compute_region_backend_service" "foobar" {
|
||||||
name = "%s"
|
name = "%s"
|
||||||
health_checks = ["${google_compute_health_check.one.self_link}"]
|
health_checks = ["${google_compute_health_check.one.self_link}"]
|
||||||
load_balancing_scheme = "INTERNAL"
|
|
||||||
region = "us-central1"
|
region = "us-central1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +218,6 @@ resource "google_compute_region_backend_service" "lipsum" {
|
|||||||
protocol = "TCP"
|
protocol = "TCP"
|
||||||
region = "us-central1"
|
region = "us-central1"
|
||||||
timeout_sec = %v
|
timeout_sec = %v
|
||||||
load_balancing_scheme = "INTERNAL"
|
|
||||||
|
|
||||||
backend {
|
backend {
|
||||||
group = "${google_compute_instance_group_manager.foobar.instance_group}"
|
group = "${google_compute_instance_group_manager.foobar.instance_group}"
|
||||||
|
Loading…
Reference in New Issue
Block a user