diff --git a/internal/provider/resource_docker_registry_image_funcs.go b/internal/provider/resource_docker_registry_image_funcs.go index 1e1e1c5d..33ba4740 100644 --- a/internal/provider/resource_docker_registry_image_funcs.go +++ b/internal/provider/resource_docker_registry_image_funcs.go @@ -250,8 +250,11 @@ func buildHttpClientForRegistry(registryAddressWithProtocol string, insecureSkip client := http.DefaultClient if strings.HasPrefix(registryAddressWithProtocol, "https://") { - client.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: insecureSkipVerify}} + client.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: insecureSkipVerify}, Proxy: http.ProxyFromEnvironment} + } else { + client.Transport = &http.Transport{Proxy: http.ProxyFromEnvironment} } + return client }