You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Open
antoniomazzeo opened this issue
May 27, 2024
· 0 comments
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
The text was updated successfully, but these errors were encountered:
antoniomazzeo
changed the title
Unable to push 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
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
May 27, 2024
Community Note
Terraform (and docker Provider) Version
Tested with Terraform version
1.8.4
Docker provider at version
v3.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
The text was updated successfully, but these errors were encountered: