github.com/chalford/terraform@v0.3.7-0.20150113080010-a78c69a8c81f/builtin/providers/google/service_scope.go (about) 1 package google 2 3 func canonicalizeServiceScope(scope string) string { 4 // This is a convenience map of short names used by the gcloud tool 5 // to the GCE auth endpoints they alias to. 6 scopeMap := map[string]string{ 7 "bigquery": "https://www.googleapis.com/auth/bigquery", 8 "compute-ro": "https://www.googleapis.com/auth/compute.readonly", 9 "compute-rw": "https://www.googleapis.com/auth/compute", 10 "datastore": "https://www.googleapis.com/auth/datastore", 11 "sql": "https://www.googleapis.com/auth/sqlservice", 12 "sql-admin": "https://www.googleapis.com/auth/sqlservice.admin", 13 "storage-full": "https://www.googleapis.com/auth/devstorage.full_control", 14 "storage-ro": "https://www.googleapis.com/auth/devstorage.read_only", 15 "storage-rw": "https://www.googleapis.com/auth/devstorage.read_write", 16 "taskqueue": "https://www.googleapis.com/auth/taskqueue", 17 "userinfo-email": "https://www.googleapis.com/auth/userinfo.email", 18 } 19 20 if matchedUrl, ok := scopeMap[scope]; ok { 21 return matchedUrl 22 } else { 23 return scope 24 } 25 }