mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
provider/google: add scope aliases
This commit is contained in:
parent
f8ce3f10ac
commit
cb2e81ba84
@ -4,23 +4,28 @@ func canonicalizeServiceScope(scope string) string {
|
|||||||
// This is a convenience map of short names used by the gcloud tool
|
// This is a convenience map of short names used by the gcloud tool
|
||||||
// to the GCE auth endpoints they alias to.
|
// to the GCE auth endpoints they alias to.
|
||||||
scopeMap := map[string]string{
|
scopeMap := map[string]string{
|
||||||
"bigquery": "https://www.googleapis.com/auth/bigquery",
|
"bigquery": "https://www.googleapis.com/auth/bigquery",
|
||||||
"cloud-platform": "https://www.googleapis.com/auth/cloud-platform",
|
"cloud-platform": "https://www.googleapis.com/auth/cloud-platform",
|
||||||
"compute-ro": "https://www.googleapis.com/auth/compute.readonly",
|
"cloud-source-repos": "https://www.googleapis.com/auth/source.full_control",
|
||||||
"compute-rw": "https://www.googleapis.com/auth/compute",
|
"cloud-source-repos-ro": "https://www.googleapis.com/auth/source.read_only",
|
||||||
"datastore": "https://www.googleapis.com/auth/datastore",
|
"compute-ro": "https://www.googleapis.com/auth/compute.readonly",
|
||||||
"logging-write": "https://www.googleapis.com/auth/logging.write",
|
"compute-rw": "https://www.googleapis.com/auth/compute",
|
||||||
"monitoring": "https://www.googleapis.com/auth/monitoring",
|
"datastore": "https://www.googleapis.com/auth/datastore",
|
||||||
"pubsub": "https://www.googleapis.com/auth/pubsub",
|
"logging-write": "https://www.googleapis.com/auth/logging.write",
|
||||||
"sql": "https://www.googleapis.com/auth/sqlservice",
|
"monitoring": "https://www.googleapis.com/auth/monitoring",
|
||||||
"sql-admin": "https://www.googleapis.com/auth/sqlservice.admin",
|
"monitoring-write": "https://www.googleapis.com/auth/monitoring.write",
|
||||||
"storage-full": "https://www.googleapis.com/auth/devstorage.full_control",
|
"pubsub": "https://www.googleapis.com/auth/pubsub",
|
||||||
"storage-ro": "https://www.googleapis.com/auth/devstorage.read_only",
|
"service-control": "https://www.googleapis.com/auth/servicecontrol",
|
||||||
"storage-rw": "https://www.googleapis.com/auth/devstorage.read_write",
|
"service-management": "https://www.googleapis.com/auth/service.management.readonly",
|
||||||
"taskqueue": "https://www.googleapis.com/auth/taskqueue",
|
"sql": "https://www.googleapis.com/auth/sqlservice",
|
||||||
"useraccounts-ro": "https://www.googleapis.com/auth/cloud.useraccounts.readonly",
|
"sql-admin": "https://www.googleapis.com/auth/sqlservice.admin",
|
||||||
"useraccounts-rw": "https://www.googleapis.com/auth/cloud.useraccounts",
|
"storage-full": "https://www.googleapis.com/auth/devstorage.full_control",
|
||||||
"userinfo-email": "https://www.googleapis.com/auth/userinfo.email",
|
"storage-ro": "https://www.googleapis.com/auth/devstorage.read_only",
|
||||||
|
"storage-rw": "https://www.googleapis.com/auth/devstorage.read_write",
|
||||||
|
"taskqueue": "https://www.googleapis.com/auth/taskqueue",
|
||||||
|
"useraccounts-ro": "https://www.googleapis.com/auth/cloud.useraccounts.readonly",
|
||||||
|
"useraccounts-rw": "https://www.googleapis.com/auth/cloud.useraccounts",
|
||||||
|
"userinfo-email": "https://www.googleapis.com/auth/userinfo.email",
|
||||||
}
|
}
|
||||||
|
|
||||||
if matchedURL, ok := scopeMap[scope]; ok {
|
if matchedURL, ok := scopeMap[scope]; ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user