This message was deleted.
# google-cloud
s
This message was deleted.
f
This is what I do in TypeScript:
Copy code
new gcp.cloudrun.IamBinding('idp-api-service-iam-binding', {
  location: gcpConfig.require('region'),
  service: idpApiCloudRunService.name,
  role: 'roles/run.invoker',
  members: ['allUsers'],
});
Adding that binding will ensure the CloudRun service allows unauthenticated user access.
I know that's not cloudrun V2, but it seems to work fine even though the service was created with cloudrunv2
c
Yeah -- I'm trying the go version of that now. But that is using the cloudrun package not the cloudrunv2 package
giving it a shot right now 🙂
That does indeed work! Thanks
🙌 1
g
We got this to work for cloudrunv2 (TypeScript)
Copy code
// Create an IAM member to allow the service to be publicly accessible.
const apiNestInvoker = new gcp.cloudrunv2.ServiceIamBinding(
  'api-server-invoker',
  {
    role: 'roles/run.invoker',
    members: ['allUsers'],
    name: apiServerService.name,
    location: gcpRegion,
    project: projectNameAndId,
  },
);
c
I tried that before I used the cloudrun package. It doesn't even compile as the args don't have a name property