I am trying to deploy a simple cloud function (gen1) in my project. I have owner permission for the project.
however, while deploying I am getting following error.
"build": ERROR: failed to initialize analyzer: validating registry write access: ensure registry read/write access to us.gcr.io/project_xxx/gcf/northamerica-northeast1/3c5aeef8-dfbd-43de-9873-16a1b68e54ed/cache:4f2ca2a4-acef-42e1-94e2-3123fcd93c70"
I also provided Artifact Registry Administrator role to the service account tied to cloud function. however, I am still getting above error.
Update 1:
I gave Artifact Registry Administrator permission for cloudbuild.gserviceaccount.com service account as well. However, same error.
Update 2
Just to isolate the problem, I gave owner permission to both the service accounts. cloud function and cloud build service account and I am still getting this issue.
I checked the path as well for artifactory and it's empty. us.gcr.io/project-xxx/gcf/northamerica-northeast1/f4d0d3b2-6ed4-4e04-aab1-708b19e26d9c/cache:39767ec4-9f7d-4992-82c8-ae8d9658b909
I also, deleted the entire function and created new one with same service account and still getting issue.
Update 3:
I checked the cloudbuild settings and seems like it has all the access required.