0

I'm new to this and I need some help with Google Cloud. Basically, I was trying to create a project which uses many different CF and even works with DialogFlow CX.

The problem is that if I try to use a Gen 2 CF it gives me authentication problems if I set it 'Private'.

Is it possible to use the CF without setting that public or using a Gen 1 CF?

Gabone
  • 1

2 Answers2

0

You can find good references at the Securing Cloud Functions documentation.

Basically, the default deployment is private which will require some sort of authentication (user account based or service account based -- more details on the doc aforementioned).

So, if I understood the scenario correctly, you just need to properly setup the authentication configuration and then your scenario of Dialogflow interacting with a Google Cloud Function service will work as expected.

Luciano Martins
  • 421
  • 1
  • 9
0

Cloud Functions 2nd gen uses Cloud Run, which changes the IAM roles required. If the cloud function is in the same project-id as the CF 2nd gen. You can try to add "roles/run.invoker" for the Dialogflow Service Account. One way to add the role is to use this command at the cloud shell on the cloud function page.

gcloud run services add-iam-policy-binding [FUNCTION-NAME] \
--region="[YOUR-CF-REGION]"\
--role="roles/run.invoker"\
--member="serviceAccount:[YOUR-DIALOGFLOW-SERVICE-ACCOUNT]"
jon_17z
  • 91
  • 7