Code Monkey home page Code Monkey logo

Comments (9)

huron25 avatar huron25 commented on June 7, 2024

Upon further review, I think it actually should be corrected to this:

resource "google_pubsub_topic_iam_member" "pubsub_viewer_role" {
  count         = var.create_subscriber ? 1 : 0
  role          = "roles/pubsub.viewer"
  project       = var.project_id
  subscription  = local.pubsub_subscription
  member        = "serviceAccount:${google_service_account.pubsub_subscriber[0].email}"
}

My apologies for overlooking the local subscription reference.

from terraform-google-log-export.

morgante avatar morgante commented on June 7, 2024

In my testing before, permissions have been inherited so I'm unsure why that changed. Are you using a push or pull subscription?

from terraform-google-log-export.

huron25 avatar huron25 commented on June 7, 2024

I'm using a Pull subscription.

Even when I do it manually in the UI, I do not see that users given the subscriber role to a topic have any permissions on the associated subscription.

from terraform-google-log-export.

huron25 avatar huron25 commented on June 7, 2024

Here's the output from projects.topics.getIamPolicy:

{
"version": 1,
"etag": "BwXBLs1ROoM=",
"bindings": [
{
"role": "roles/pubsub.subscriber",
"members": [
"user:[email protected]"
]
}
]
}

And the output from the API call of associated subscription (projects.subscriptions.getIamPolicy):

{
"etag": "ACAB"
}

from terraform-google-log-export.

morgante avatar morgante commented on June 7, 2024

Right, they wouldn't show up on the subscription necessarily.

I'm curious about the actual behavior—are you not able to pull from the subscription?

from terraform-google-log-export.

huron25 avatar huron25 commented on June 7, 2024

We're pulling it via the Splunk Add-on for GCP - I've published multiple test messages and Splunk is NOT able to pull them when a service account has Subscriber on the Topic

The moment that I give the service account the Subscriber role on the Subscription, Splunk can then pull them (immediately).

from terraform-google-log-export.

morgante avatar morgante commented on June 7, 2024

Odd, do you mind opening a pull request to fix it?

from terraform-google-log-export.

huron25 avatar huron25 commented on June 7, 2024

I actually have the code fixed locally, but don't know how to do the testing

from terraform-google-log-export.

morgante avatar morgante commented on June 7, 2024

@huron25 If you open a pull request, our CI will run the tests.

You can also learn more in our codelab: https://codelabs.developers.google.com/codelabs/cft-onboarding/#0

from terraform-google-log-export.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.