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

Cloud Logging needs owner permissions on the bucket #584

Closed
quartzmo opened this issue Mar 16, 2016 · 0 comments · Fixed by #585
Closed

Cloud Logging needs owner permissions on the bucket #584

quartzmo opened this issue Mar 16, 2016 · 0 comments · Fixed by #585
Assignees
Labels
api: logging Issues related to the Cloud Logging API. type: question Request for information or clarification. Not an issue.

Comments

@quartzmo
Copy link
Member

What is the required Storage Bucket configuration to successfully create a Logging Sink?

Same as or similar to googleapis/google-cloud-python#1614 .

irb(main):004:0> bucket = storage.bucket "my-syslog-bucket"
=> #<Gcloud::Storage::Bucket:0x007fd144a3e2e8 @connection=Gcloud::Storage::Connection(---), @gapi=#<Google::APIClient::Schema::Storage::V1::Bucket:0x3fe8a251f1ec DATA:{"kind"=>"storage#bucket", "id"=>"my-syslog-bucket", "selfLink"=>"https://www.googleapis.com/storage/v1/b/my-syslog-bucket", "projectNumber"=>"---", "name"=>"my-syslog-bucket", "timeCreated"=>"2016-03-04T18:24:37.626Z", "updated"=>"2016-03-04T18:24:37.626Z", "metageneration"=>"1", "owner"=>{"entity"=>"project-owners----"}, "location"=>"US", "storageClass"=>"STANDARD", "etag"=>"CAE="}>>
irb(main):006:0> bucket.acl
=> #<Gcloud::Storage::Bucket::Acl:0x007fd142836678 @bucket="my-syslog-bucket", @connection=Gcloud::Storage::Connection(---), @owners=nil, @writers=nil, @readers=nil>
irb(main):007:0> sink = logging.create_sink "my-sink", "storage.googleapis.com/#{bucket.id}", filter: "log:syslog"
Gcloud::PermissionDeniedError: 7:Cloud Logging needs owner permissions on the bucket: my-syslog-bucket
    from /Users/quartzmo/code/google/codez/gcloud-ruby/lib/gcloud/logging/project.rb:480:in `rescue in create_sink'
    from /Users/quartzmo/code/google/codez/gcloud-ruby/lib/gcloud/logging/project.rb:475:in `create_sink'
@quartzmo quartzmo added type: question Request for information or clarification. Not an issue. api: logging Issues related to the Cloud Logging API. labels Mar 16, 2016
@quartzmo quartzmo self-assigned this Mar 16, 2016
quartzmo added a commit to quartzmo/google-cloud-ruby that referenced this issue Mar 16, 2016
@quartzmo quartzmo added this to the 0.7.0 - Logging milestone Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant