Я использую шаблон экземпляра со следующими метаданными:Google Compute Engine: Запуск сценария Не Загрузка
и доступ к проекту:
Какие эквивалентен следующим параметрам командной строки:
gcloud compute --project "myProj" instance-templates create "myProj-template" --machine-type "n1-standard-2" --network "default" --metadata "startup-script-url=gs://my-bucket/startup-script.sh" --scopes "https://www.googleapis.com/auth/devstorage.read_only" --image "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1404-trusty-v20150316" --boot-disk-type "pd-ssd" --boot-disk-device-name "myProj-template"
Но когда дело доходит до выполнения я получаю следующее сообщение об ошибке:
google: URL gs://my-bucket/startup-script.sh is not located in Google Storage
google: Downloading url from gs://my-bucket/startup-script.sh to /var/run/google.startup.script using curl
google: Failed to download gs://my-bucket/startup-script.sh
google: AccessDeniedException: 403 Access Not Configured. Please go to the Google Developers Console (https://cloud.google.com/console#/project) for your project, select APIs and Auth and enable the Google Cloud Storage JSON API.
google: curl: (1) Protocol gs not supported or disabled in libcurl
google: Could not download startup script gs://my-bucket/startup-script.sh.
Я подтвердил, что у меня есть доступ к API включен на мой проект для Google Cloud Storage :