Lack of writerIdentity field in Logging Sink API output

155 views
Skip to first unread message

Alexander Makarenko

unread,
Aug 30, 2021, 1:24:05 PM8/30/21
to google-stackdr...@googlegroups.com

Hey,


I am working on the update of Cloud Logging functionality in the Terraform GCP provider. Namely, I am working on the support of automatically created sinks (_Default_Required).


What I found out recently was that writerIdentity field is not always present so it is hard to determine if the project sink has unique writer identity or not.


First I saw this with _Default sink (the only case when writerIdentity was set, was when I’ve set a logging bucket in another project as a destination for the sink).


Similar behavior I saw with newly created sinks. If I set _Default logging bucket in the same project for the newly created sink, writerIdentity will be unset in the output of the POST (create) call.


Is this behavior correct? How can it be interpreted - in other words, is this a sign of using unique writer identity or not?


I am asking, because when it comes to Terraform it should be possible to import the state of the project sink and determine if it uses unique writer identity or not without initial configuration. And currently some tests checking this are failing for me.

--
Sincerely,
Alexander Makarenko

Igor Peshansky

unread,
Aug 30, 2021, 2:06:18 PM8/30/21
to Alexander Makarenko, Reed Taylor, Mary Koes, google-stackdr...@googlegroups.com

--
© 2021 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/CAJq3T%3DSU1n3iNwQZM8wXLEwu1e-N6y7-T%3DHC9m0wuY%2B1RGnghw%40mail.gmail.com.

andre...@google.com

unread,
Sep 2, 2021, 11:55:56 AM9/2/21
to Google Stackdriver Discussion Forum
Hi Alexander,
  Log Bucket sinks where the destination is in the same project as the sink do not have an associated service account (no writerIdentity).
(We are updating our documentation to make this clearer)
  Thanks
      Andrew

Reply all
Reply to author
Forward
0 new messages