any clue why im getting: `gcp:organizations/getIAM...
# python
any clue why im getting:
gcp:organizations/getIAMPolicy:getIAMPolicy returned an error: grpc: error while marshaling: proto: repeated field Values has nil element
Copy code
scheduler_policy_func_invoker = organizations.get_iam_policy(bindings=[
            "members": [job_account_member],
            "role": "roles/cloudfunctions.invoker",
Based on my recent experience with the same error in a different context, I would suggest that your
variable is empty. Perhaps it's an async problem where the future/promise isn't working as expected but in any case the opaque (to the Python layer) error message is clearly abstraction bleed-through that hasn't been captured properly. If you can replace
with the literal text I suspect your problem will disappear.
Hmm, what if I can't? I'm creating service account and
is a product of using apply on this service account
Yeah. That's a problem. In my case (explained in very recent history here in the channel if you're curious) I was just trying to consume the AWS ARN of a recently created resource; in this case I could manually extrapolate the expected ARN because ARNs have predictable structure. It seemed to work, although I'm concerned that there is a latent race condition that may cause it to randomly fail in future. Being able to consume the variable as generated makes a lot more sense.
If you have Pulumi support it might be a good idea to contact them for an answer. The documentation just seems to point to
as the correct solution but that definitely didn't work in my case.
I don't have pulumi support. What troubles me is that in other places it works just fine.
For example I have a
cloud scheduler
that takes this
as a parameter.
It goes through smoothly
but when i try to build iam policy document it shits on this async process and just tries to access this variable immedietly.
ill file an issue, becuase it seems like very critical bug
Maybe it is something intrinsic to IAM policies, because my situation related to IAM as well. If you post a link to your issue report I'll add some comments about my context in case it helps.