github.com/hobbeswalsh/terraform@v0.3.7-0.20150619183303-ad17cf55a0fa/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 "logging-write": "https://www.googleapis.com/auth/logging.write", 12 "sql": "https://www.googleapis.com/auth/sqlservice", 13 "sql-admin": "https://www.googleapis.com/auth/sqlservice.admin", 14 "storage-full": "https://www.googleapis.com/auth/devstorage.full_control", 15 "storage-ro": "https://www.googleapis.com/auth/devstorage.read_only", 16 "storage-rw": "https://www.googleapis.com/auth/devstorage.read_write", 17 "taskqueue": "https://www.googleapis.com/auth/taskqueue", 18 "userinfo-email": "https://www.googleapis.com/auth/userinfo.email", 19 } 20 21 if matchedUrl, ok := scopeMap[scope]; ok { 22 return matchedUrl 23 } else { 24 return scope 25 } 26 }