I'm trying to set up a Google Cloud Build pipeline, which will deploy an image to Cloud Run and create a domain mapping. Everything works fine in Web UI, but when I do gcloud bet run domain-mappings create ... in Cloud Build step I'm getting error message:
ERROR: (gcloud.beta.run.domain-mappings.create) The provided domain does not appear to be verified for the current account so a domain mapping cannot be created. Visit [https://cloud.google.com/run/docs/mapping-custom-domains/] for more information.
The domain for which I'm setting the mapping is hosted also in Google Cloud (Cloud Domains) and dns are managed via Cloud DNS. As I said, using Web UI works like a charm.
I tried to verify the domain using generated ID and putting it to TXT dns record - without luck. I don't see any option to "authorize" Service Account which is running on behalf of Cloud Build, nor see any legit IAM permission.
Any ideas please?
OK, I've found the solution here: Google Cloud API: Can't create domain mapping with App Engine service account
Added cloudbuild service account to the Google Search Console for given domain as an owner and it works!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With