Error during pushing image to GCP Artifact Registry, Unable to create image, image not found: unable to get digest: Got bad response from registry: 405 Method Not Allowed #621
The Docker image is correctly pushed to the GCP Artifact Registry, but the terraform provider gives the error "Unable to create image, image not found: unable to get digest: Got bad response from registry: 405 Method Not Allowed" trying to get image digest.
Seems like GCP Artifact Registry is rejecting the HEAD http verb while getting the image digest (data_source_docker_registry_image.go), changing it to GET, everything works as expected, but I don't know if it still works for other registries as well.
Community Note
Terraform (and docker Provider) Version
Tested with Terraform version
1.8.4
Docker provider at versionv3.0.2
Affected Resource(s)
docker_registry_image
Terraform Configuration Files
Debug Output
(https://gist.github.com/antoniomazzeo/3066b66c381b660765eef0819bad224c)
Expected Behaviour
Docker image should be pushed without errors
Actual Behaviour
The Docker image is correctly pushed to the GCP Artifact Registry, but the terraform provider gives the error "Unable to create image, image not found: unable to get digest: Got bad response from registry: 405 Method Not Allowed" trying to get image digest. Seems like GCP Artifact Registry is rejecting the HEAD http verb while getting the image digest (data_source_docker_registry_image.go), changing it to GET, everything works as expected, but I don't know if it still works for other registries as well.
Steps to Reproduce
terraform apply