|
|
|
|
@ -164,6 +164,61 @@ func TestAccGoogleProjectServices_ignoreUnenablableServices(t *testing.T) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestAccGoogleProjectServices_manyServices(t *testing.T) {
|
|
|
|
|
skipIfEnvNotSet(t,
|
|
|
|
|
[]string{
|
|
|
|
|
"GOOGLE_ORG",
|
|
|
|
|
"GOOGLE_BILLING_ACCOUNT",
|
|
|
|
|
}...,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
billingId := os.Getenv("GOOGLE_BILLING_ACCOUNT")
|
|
|
|
|
pid := "terraform-" + acctest.RandString(10)
|
|
|
|
|
services := []string{
|
|
|
|
|
"bigquery-json.googleapis.com",
|
|
|
|
|
"cloudbuild.googleapis.com",
|
|
|
|
|
"cloudfunctions.googleapis.com",
|
|
|
|
|
"cloudresourcemanager.googleapis.com",
|
|
|
|
|
"cloudtrace.googleapis.com",
|
|
|
|
|
"compute-component.googleapis.com",
|
|
|
|
|
"container.googleapis.com",
|
|
|
|
|
"containerregistry.googleapis.com",
|
|
|
|
|
"dataflow.googleapis.com",
|
|
|
|
|
"dataproc.googleapis.com",
|
|
|
|
|
"deploymentmanager.googleapis.com",
|
|
|
|
|
"dns.googleapis.com",
|
|
|
|
|
"endpoints.googleapis.com",
|
|
|
|
|
"iam.googleapis.com",
|
|
|
|
|
"logging.googleapis.com",
|
|
|
|
|
"ml.googleapis.com",
|
|
|
|
|
"monitoring.googleapis.com",
|
|
|
|
|
"pubsub.googleapis.com",
|
|
|
|
|
"replicapool.googleapis.com",
|
|
|
|
|
"replicapoolupdater.googleapis.com",
|
|
|
|
|
"resourceviews.googleapis.com",
|
|
|
|
|
"runtimeconfig.googleapis.com",
|
|
|
|
|
"servicecontrol.googleapis.com",
|
|
|
|
|
"servicemanagement.googleapis.com",
|
|
|
|
|
"sourcerepo.googleapis.com",
|
|
|
|
|
"spanner.googleapis.com",
|
|
|
|
|
"storage-api.googleapis.com",
|
|
|
|
|
"storage-component.googleapis.com",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
|
Providers: testAccProviders,
|
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
|
resource.TestStep{
|
|
|
|
|
Config: testAccGoogleProjectAssociateServicesBasic_withBilling(services, pid, pname, org, billingId),
|
|
|
|
|
Check: resource.ComposeTestCheckFunc(
|
|
|
|
|
testProjectServicesMatch(services, pid),
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func testAccGoogleProjectAssociateServicesBasic(services []string, pid, name, org string) string {
|
|
|
|
|
return fmt.Sprintf(`
|
|
|
|
|
resource "google_project" "acceptance" {
|
|
|
|
|
|