我有以下gcloud命令:
gcloud container clusters create my-cluster
--region us-east1
--node-locations us-east1-b,us-east1-c,us-east1-d
--disk-type=pd-ssd
--disk-size=50GB
--labels=portworx=gke
--machine-type=n1-highcpu-8
--num-nodes=3
--image-type ubuntu
--scopes compute-rw,storage-ro
--enable-autoscaling --max-nodes=6 --min-nodes=3
我正试图弄清楚具体是什么:
--scopes compute-rw,storage-ro
在我的配置中,我能找到的最接近它的东西是oauth_scopes,如果这是--scope映射到的,那么compute_rw和storage ro映射到什么,因为oauth_sscopes获取URL。
没错,scopes在Terraform中转换为oauth_scopes
。从Terraform文档中,您可以看到定义:
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#oauth_scopes
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform"
]
在gcloud命令中,compute rw表示读写,storage ro表示存储只读。这将转化为以下范围:
oauth_scopes = [
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only"
]