Error: Error applying plan:
1 error(s) occurred:
* module.gce-lb-http.google_compute_backend_service.default: 1 error(s) occurred:
* google_compute_backend_service.default: Error creating backend service: googleapi: Error 400: Invalid value for field 'resource.backends[0].group': ''. Only Instance Group URLs are allowed., invalid
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Here my main.tf :
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
variable region {
default = "europe-west1"
}
provider google {
region = "${var.region}"
}
module "gce-lb-http" {
source = "github.com/GoogleCloudPlatform/terraform-google-lb-http"
version = "1.0.5"
name = "http-lb"
target_tags = ["${module.mig1.target_tags}", "${module.mig2.target_tags}"]
backends = {
"0" = [
{
group = "${module.mig1.instance_group}"
# group = "https://www.googleapis.com/compute/v1/projects/courseur-staging/zones/us-central1-b/instanceGroups/gke-examplecluster-hdja738s-group"
},
{
group = "${module.mig2.instance_group}"
},
]
}
backend_params = [
// health check path, port name, port number, timeout seconds.
"/,http,80,10",
]
}
Hi,
after doing a
terraform init
Here my main.tf :
my instance manager conf :