terraform-provider-ko icon indicating copy to clipboard operation
terraform-provider-ko copied to clipboard

Error creating Service: googleapi: Error 400: spec.template.spec.containers[0].image: Expected an image path like [host/]repo-path[:tag and/or @digest]

Open mattn opened this issue 11 months ago • 3 comments

I'm trying provider-examples/cloudrun but

Error: Error creating Service: googleapi: Error 400: spec.template.spec.containers[0].image: Expected an image path like [host/]repo-path[:tag and/or @digest], where host is one of [region.]gcr.io, [region-]docker.pkg.dev or docker.io but obtained ghcr.io/mattn/terraform-provier-ko-example/github.com/ko-build/terraform-provider-ko/cmd/test@sha256:1c084931f385ea9a5dabb8ed079c1633dbb509c21c9d292f53e551394ddac53a

What is wrong?

mattn avatar Dec 15 '24 03:12 mattn

This error message is (cryptically) telling you that Cloud Run only supports deploying images on GCP's Artifact Registry or (legacy) GCR. Pushing the image to GHCR won't work, unfortunately.

If you try this with a GAR/GCR repo and it doesn't work, please let me know!

imjasonh avatar Dec 16 '24 17:12 imjasonh

https://github.com/ko-build/terraform-provider-ko/pull/206

imjasonh avatar Dec 16 '24 17:12 imjasonh

How to pass --bare or --tags-only into terraform process?

mattn avatar Dec 18 '24 09:12 mattn