Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Resource Manager: update API from v1beta1 to v3 #2

Description

@enriquejosepadilla

Python: 3.5.3
Operating System: Debian GNU
Pip Freeze:

google-api-core==1.3.0
google-api-python-client==1.7.4
google-auth==1.5.1
google-auth-httplib2==0.0.3
google-cloud-container==0.1.1
google-cloud-core==0.28.1
google-cloud-resource-manager==0.28.1
google-cloud-storage==1.11.0
google-resumable-media==0.3.1
googleapis-common-protos==1.5.3

Stacktrace:

Traceback (most recent call last):
File "/usr/local/google/home/epad/.local/share/virtualenvs/django-gke-0KxaOTFM/bin/django_gke", line 11, in
load_entry_point('django-gke', 'console_scripts', 'django_gke')()
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/django_gke.py", line 253, in main
args.func(args.debug)
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/django_gke.py", line 173, in new
project_id = goog_client.create_project_workflow()
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/cli/google_client.py", line 111, in create_project_workflow
project_id, project_name)
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/cloudlib/project.py", line 40, in create_and_set_existing_project
self._create_project(project)
File "/usr/local/google/home/epad/.local/share/virtualenvs/django-gke-0KxaOTFM/lib/python3.5/site-packages/backoff/_sync.py", line 99, in retry
ret = target(*args, **kwargs)
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/cloudlib/project.py", line 55, in _create_project
project.create()
File "/usr/local/google/home/epad/.local/share/virtualenvs/django-gke-0KxaOTFM/lib/python3.5/site-packages/google/cloud/resource_manager/project.py", line 138, in create
data=data)
File "/usr/local/google/home/epad/.local/share/virtualenvs/django-gke-0KxaOTFM/lib/python3.5/site-packages/google/cloud/_http.py", line 293, in api_request
raise exceptions.from_http_response(response)
google.api_core.exceptions.Forbidden: 403 POST https://cloudresourcemanager.googleapis.com/v1beta1/projects: The caller does not have permission

Steps to reproduce: Using Gcloud auth login with a non corp account and the attempting to project.create() will throw this error.

We are able to get this to work with corp accounts but will be doing external users soon and found that this fails.

I believe changing the version here to v1 would fix this.

Metadata

Metadata

Assignees

Labels

api: cloudresourcemanagerIssues related to the googleapis/python-resource-manager API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions