Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/google: add scope aliases #9442

Merged
merged 1 commit into from
Oct 24, 2016

Conversation

obsh
Copy link
Contributor

@obsh obsh commented Oct 18, 2016

Hi,
this PR adds following gcloud scope aliases:

  • cloud-source-repos
  • monitoring-write
  • service-control
  • service-management

It is based on scope aliases list from this page: :https://cloud.google.com/sdk/gcloud/reference/compute/instances/create

Copy link
Contributor

@cblecker cblecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question. Looks good otherwise.

"logging-write": "https://www.googleapis.com/auth/logging.write",
"monitoring": "https://www.googleapis.com/auth/monitoring",
"monitoring-write": "https://www.googleapis.com/auth/monitoring.write",
"pubsub": "https://www.googleapis.com/auth/pubsub",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see pubsub in the list you linked. Was it deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked pubsub alias with gcloud, it doesn't work:

gcloud compute instances create test-scopes \
  --image-project=debian-cloud \
  --image-family=debian-8 \
  --machine-type n1-standard-1 \
  --scopes pubsub

 ERROR: (gcloud.compute.instances.create) Some requests did not succeed:
 - One or more of the service account scopes are invalid: 'pubsub'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I guess we should remove this from the list in Terraform too, while we're updating the scopes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it break configurations, that uses this alias?
Because full scope "https://www.googleapis.com/auth/pubsub" works, so alias is workable now in Terraform.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Yeah, I just wanted to make sure that it was still a valid scope. Was able to confirm here: https://developers.google.com/identity/protocols/googlescopes#pubsubv1

@obsh
Copy link
Contributor Author

obsh commented Oct 19, 2016

Also I see "cloud-source-repos-ro" in the list, I'm pretty sure it was added today.
Added to PR.

@stack72
Copy link
Contributor

stack72 commented Oct 24, 2016

Thanks for the work here @obsh :) LGTM!

@stack72 stack72 merged commit eaee3b9 into hashicorp:master Oct 24, 2016
@ghost
Copy link

ghost commented Apr 21, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants