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,
|
||||
},
|
||||
|
||||
"load_balancing_scheme": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"project": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
|
@ -118,8 +112,9 @@ func resourceComputeRegionBackendServiceCreate(d *schema.ResourceData, meta inte
|
|||
}
|
||||
|
||||
service := compute.BackendService{
|
||||
Name: d.Get("name").(string),
|
||||
HealthChecks: healthChecks,
|
||||
Name: d.Get("name").(string),
|
||||
HealthChecks: healthChecks,
|
||||
LoadBalancingScheme: "INTERNAL",
|
||||
}
|
||||
|
||||
if v, ok := d.GetOk("backend"); ok {
|
||||
|
@ -138,10 +133,6 @@ func resourceComputeRegionBackendServiceCreate(d *schema.ResourceData, meta inte
|
|||
service.TimeoutSec = int64(v.(int))
|
||||
}
|
||||
|
||||
if v, ok := d.GetOk("load_balancing_scheme"); ok {
|
||||
service.LoadBalancingScheme = v.(string)
|
||||
}
|
||||
|
||||
project, err := getProject(d, config)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -203,7 +194,6 @@ func resourceComputeRegionBackendServiceRead(d *schema.ResourceData, meta interf
|
|||
d.Set("protocol", service.Protocol)
|
||||
d.Set("timeout_sec", service.TimeoutSec)
|
||||
d.Set("fingerprint", service.Fingerprint)
|
||||
d.Set("load_balancing_scheme", service.LoadBalancingScheme)
|
||||
d.Set("self_link", service.SelfLink)
|
||||
|
||||
d.Set("backend", flattenBackends(service.Backends))
|
||||
|
@ -232,9 +222,10 @@ func resourceComputeRegionBackendServiceUpdate(d *schema.ResourceData, meta inte
|
|||
}
|
||||
|
||||
service := compute.BackendService{
|
||||
Name: d.Get("name").(string),
|
||||
Fingerprint: d.Get("fingerprint").(string),
|
||||
HealthChecks: healthChecks,
|
||||
Name: d.Get("name").(string),
|
||||
Fingerprint: d.Get("fingerprint").(string),
|
||||
HealthChecks: healthChecks,
|
||||
LoadBalancingScheme: "INTERNAL",
|
||||
}
|
||||
|
||||
// Optional things
|
||||
|
@ -251,10 +242,6 @@ func resourceComputeRegionBackendServiceUpdate(d *schema.ResourceData, meta inte
|
|||
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)
|
||||
op, err := config.clientCompute.RegionBackendServices.Update(
|
||||
project, region, d.Id(), &service).Do()
|
||||
|
|
|
@ -166,7 +166,6 @@ func testAccComputeRegionBackendService_basic(serviceName, checkName string) str
|
|||
resource "google_compute_region_backend_service" "foobar" {
|
||||
name = "%s"
|
||||
health_checks = ["${google_compute_health_check.zero.self_link}"]
|
||||
load_balancing_scheme = "INTERNAL"
|
||||
region = "us-central1"
|
||||
}
|
||||
|
||||
|
@ -187,7 +186,6 @@ func testAccComputeRegionBackendService_basicModified(serviceName, checkOne, che
|
|||
resource "google_compute_region_backend_service" "foobar" {
|
||||
name = "%s"
|
||||
health_checks = ["${google_compute_health_check.one.self_link}"]
|
||||
load_balancing_scheme = "INTERNAL"
|
||||
region = "us-central1"
|
||||
}
|
||||
|
||||
|
@ -220,7 +218,6 @@ resource "google_compute_region_backend_service" "lipsum" {
|
|||
protocol = "TCP"
|
||||
region = "us-central1"
|
||||
timeout_sec = %v
|
||||
load_balancing_scheme = "INTERNAL"
|
||||
|
||||
backend {
|
||||
group = "${google_compute_instance_group_manager.foobar.instance_group}"
|
||||
|
|
Loading…
Reference in New Issue