Last active
May 25, 2018 19:47
-
-
Save adamenger/9cd542bdcd860e0c8126b6ac9b6e9197 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/google/resource_google_project_services.go b/google/resource_google_project_services.go | |
index bc26d53..a39af2c 100644 | |
--- a/google/resource_google_project_services.go | |
+++ b/google/resource_google_project_services.go | |
@@ -212,11 +212,11 @@ func enableServices(s []string, pid string, config *Config) error { | |
var sop *serviceusage.Operation | |
var err error | |
if len(s) > 1 { | |
- req := &serviceusage.BatchEnableServicesRequest{ServiceIds: s} | |
- sop, err = config.clientServiceUsage.Services.BatchEnable("projects/"+pid, req).Do() | |
- } else if len(s) == 1 { | |
- name := fmt.Sprintf("projects/%s/services/%s", pid, s[0]) | |
- sop, err = config.clientServiceUsage.Services.Enable(name, &serviceusage.EnableServiceRequest{}).Do() | |
+ for _, service := range s { | |
+ name := fmt.Sprintf("projects/%s/services/%s", pid, service) | |
+ sop, err = config.clientServiceUsage.Services.Enable(name, &serviceusage.EnableServiceRequest{}).Do() | |
+ log.Printf("service: %s\n", service) | |
+ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment