mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-18 23:06:10 -05:00
fix(deps): update module golang.org/x/sync to v0.17.0 (#785)
* fix(deps): update module golang.org/x/sync to v0.17.0 * fix(lint): cleanup error strings --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Martin Wentzel <nitram.wentzel@gmail.com> Co-authored-by: Martin <Junkern@users.noreply.github.com>
This commit is contained in:
parent
974fe956aa
commit
1ceb95b61b
6 changed files with 20 additions and 566 deletions
41
go.mod
41
go.mod
|
|
@ -1,6 +1,6 @@
|
|||
module github.com/terraform-providers/terraform-provider-docker
|
||||
|
||||
go 1.23.7
|
||||
go 1.24.0
|
||||
|
||||
toolchain go1.24.6
|
||||
|
||||
|
|
@ -26,21 +26,13 @@ require (
|
|||
github.com/morikuni/aec v1.0.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
golang.org/x/sync v0.16.0
|
||||
golang.org/x/sync v0.17.0
|
||||
google.golang.org/protobuf v1.36.9
|
||||
)
|
||||
|
||||
require (
|
||||
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
|
||||
4d63.com/gochecknoglobals v0.2.2 // indirect
|
||||
cel.dev/expr v0.20.0 // indirect
|
||||
cloud.google.com/go v0.116.0 // indirect
|
||||
cloud.google.com/go/auth v0.15.0 // indirect
|
||||
cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.6.0 // indirect
|
||||
cloud.google.com/go/iam v1.2.2 // indirect
|
||||
cloud.google.com/go/monitoring v1.21.2 // indirect
|
||||
cloud.google.com/go/storage v1.49.0 // indirect
|
||||
github.com/4meepo/tagalign v1.4.2 // indirect
|
||||
github.com/Abirdcfly/dupword v0.1.3 // indirect
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
|
||||
|
|
@ -52,14 +44,9 @@ require (
|
|||
github.com/Crocmagnon/fatcontext v0.7.1 // indirect
|
||||
github.com/Djarvur/go-err113 v0.1.0 // indirect
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 // indirect
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0 // indirect
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect
|
||||
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.3.0 // indirect
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
|
||||
|
|
@ -70,12 +57,10 @@ require (
|
|||
github.com/alexkohler/prealloc v1.0.0 // indirect
|
||||
github.com/alingse/asasalint v0.0.11 // indirect
|
||||
github.com/alingse/nilnesserr v0.1.2 // indirect
|
||||
github.com/apparentlymart/go-cidr v1.1.0 // indirect
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
||||
github.com/armon/go-radix v1.0.0 // indirect
|
||||
github.com/ashanbrown/forbidigo v1.6.0 // indirect
|
||||
github.com/ashanbrown/makezero v1.2.0 // indirect
|
||||
github.com/aws/aws-sdk-go v1.37.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.30.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.27 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.27 // indirect
|
||||
|
|
@ -90,7 +75,6 @@ require (
|
|||
github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 // indirect
|
||||
github.com/aws/smithy-go v1.20.3 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
||||
github.com/bgentry/speakeasy v0.1.0 // indirect
|
||||
github.com/bkielbasa/cyclop v1.2.3 // indirect
|
||||
github.com/blizzy78/varnamelen v0.8.0 // indirect
|
||||
|
|
@ -108,7 +92,6 @@ require (
|
|||
github.com/chavacava/garif v0.1.0 // indirect
|
||||
github.com/ckaznocha/intrange v0.3.0 // indirect
|
||||
github.com/cloudflare/circl v1.6.1 // indirect
|
||||
github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect
|
||||
github.com/containerd/containerd/api v1.8.0 // indirect
|
||||
github.com/containerd/containerd/v2 v2.0.5 // indirect
|
||||
github.com/containerd/continuity v0.4.5 // indirect
|
||||
|
|
@ -125,8 +108,6 @@ require (
|
|||
github.com/docker/docker-credential-helpers v0.9.3 // indirect
|
||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
||||
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
|
||||
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
|
||||
github.com/ettle/strcase v0.2.0 // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/fatih/structtag v1.2.0 // indirect
|
||||
|
|
@ -138,7 +119,6 @@ require (
|
|||
github.com/fzipp/gocyclo v0.6.0 // indirect
|
||||
github.com/ghostiam/protogetter v0.3.9 // indirect
|
||||
github.com/go-critic/go-critic v0.12.0 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||
|
|
@ -156,7 +136,6 @@ require (
|
|||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/gofrs/flock v0.12.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
|
||||
github.com/golangci/go-printf-func-name v0.1.0 // indirect
|
||||
|
|
@ -168,11 +147,8 @@ require (
|
|||
github.com/google/gnostic-models v0.6.8 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/s2a-go v0.1.9 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
|
||||
github.com/gookit/color v1.5.4 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.1.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
|
|
@ -185,13 +161,11 @@ require (
|
|||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-getter v1.5.3 // indirect
|
||||
github.com/hashicorp/go-hclog v1.6.3 // indirect
|
||||
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-plugin v1.6.3 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
|
||||
github.com/hashicorp/go-safetemp v1.0.0 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.3 // indirect
|
||||
github.com/hashicorp/go-version v1.7.0 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
|
|
@ -202,7 +176,6 @@ require (
|
|||
github.com/hashicorp/terraform-exec v0.23.0 // indirect
|
||||
github.com/hashicorp/terraform-json v0.25.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-go v0.27.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-sdk v1.17.2 // indirect
|
||||
github.com/hashicorp/terraform-registry-address v0.2.5 // indirect
|
||||
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
|
||||
github.com/hashicorp/yamux v0.1.1 // indirect
|
||||
|
|
@ -214,7 +187,6 @@ require (
|
|||
github.com/jgautheron/goconst v1.7.1 // indirect
|
||||
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
|
||||
github.com/jjti/go-spancheck v0.6.4 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/julz/importas v0.2.0 // indirect
|
||||
|
|
@ -243,7 +215,6 @@ require (
|
|||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||
github.com/mgechev/revive v1.7.0 // indirect
|
||||
github.com/mitchellh/cli v1.1.2 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
|
|
@ -313,7 +284,6 @@ require (
|
|||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.6 // indirect
|
||||
github.com/spf13/viper v1.13.0 // indirect
|
||||
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
|
||||
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
|
|
@ -330,7 +300,6 @@ require (
|
|||
github.com/tonistiigi/go-csvvalue v0.0.0-20240710180619-ddb21b71c0b4 // indirect
|
||||
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect
|
||||
github.com/tonistiigi/vt100 v0.0.0-20240514184818-90bafcd6abab // indirect
|
||||
github.com/ulikunitz/xz v0.5.8 // indirect
|
||||
github.com/ultraware/funlen v0.2.0 // indirect
|
||||
github.com/ultraware/whitespace v0.2.0 // indirect
|
||||
github.com/uudashr/gocognit v1.2.0 // indirect
|
||||
|
|
@ -347,15 +316,11 @@ require (
|
|||
github.com/yuin/goldmark v1.7.7 // indirect
|
||||
github.com/yuin/goldmark-meta v1.1.0 // indirect
|
||||
github.com/zclconf/go-cty v1.16.3 // indirect
|
||||
github.com/zclconf/go-cty-yaml v1.0.2 // indirect
|
||||
github.com/zeebo/errs v1.4.0 // indirect
|
||||
gitlab.com/bosi/decorder v0.4.2 // indirect
|
||||
go-simpler.org/musttag v0.13.0 // indirect
|
||||
go-simpler.org/sloglint v0.9.0 // indirect
|
||||
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.56.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
|
||||
|
|
@ -383,9 +348,7 @@ require (
|
|||
golang.org/x/text v0.26.0 // indirect
|
||||
golang.org/x/time v0.11.0 // indirect
|
||||
golang.org/x/tools v0.33.0 // indirect
|
||||
google.golang.org/api v0.223.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
|
||||
google.golang.org/grpc v1.72.1 // indirect
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ func getAuthToken(auth map[string]string, username string, password string, fall
|
|||
}
|
||||
tokenRequest, err := http.NewRequest("GET", auth["realm"]+"?"+params.Encode(), nil)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("Error creating registry request: %s", err)
|
||||
return "", fmt.Errorf("error creating registry request: %s", err)
|
||||
}
|
||||
|
||||
if username != "" {
|
||||
|
|
@ -145,22 +145,22 @@ func getAuthToken(auth map[string]string, username string, password string, fall
|
|||
|
||||
tokenResponse, err := client.Do(tokenRequest)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("Error during registry request: %s", err)
|
||||
return "", fmt.Errorf("error during registry request: %s", err)
|
||||
}
|
||||
|
||||
if tokenResponse.StatusCode != http.StatusOK {
|
||||
return "", fmt.Errorf("Got bad response from registry: " + tokenResponse.Status)
|
||||
return "", fmt.Errorf("got bad response from registry: %s", tokenResponse.Status)
|
||||
}
|
||||
|
||||
body, err := io.ReadAll(tokenResponse.Body)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("Error reading response body: %s", err)
|
||||
return "", fmt.Errorf("error reading response body: %s", err)
|
||||
}
|
||||
|
||||
token := &TokenResponse{}
|
||||
err = json.Unmarshal(body, token)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("Error parsing OAuth token response: %s", err)
|
||||
return "", fmt.Errorf("error parsing OAuth token response: %s", err)
|
||||
}
|
||||
|
||||
if token.Token != "" {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ func getImageDigest(registry string, registryWithProtocol string, image, tag, us
|
|||
|
||||
// Some unexpected status was given, return an error
|
||||
default:
|
||||
return "", fmt.Errorf("Got bad response from registry: " + resp.Status)
|
||||
return "", fmt.Errorf("got bad response from registry: %s", resp.Status)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ func getDigestFromResponse(response *http.Response) (string, error) {
|
|||
if header == "" {
|
||||
body, err := io.ReadAll(response.Body)
|
||||
if err != nil || len(body) == 0 {
|
||||
return "", fmt.Errorf("Error reading registry response body: %s", err)
|
||||
return "", fmt.Errorf("error reading registry response body: %s", err)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("sha256:%x", sha256.Sum256(body)), nil
|
||||
|
|
@ -149,7 +149,7 @@ func doDigestRequest(req *http.Request, client *http.Client) (*http.Response, er
|
|||
}
|
||||
|
||||
if digestResponse.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("Got bad response from registry: " + digestResponse.Status)
|
||||
return nil, fmt.Errorf("got bad response from registry: %s", digestResponse.Status)
|
||||
}
|
||||
|
||||
return digestResponse, nil
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ func resourceDockerPluginCreate(d *schema.ResourceData, meta interface{}) error
|
|||
ctx := context.Background()
|
||||
pluginName := d.Get("name").(string)
|
||||
alias := d.Get("alias").(string)
|
||||
log.Printf("[DEBUG] Install a Docker plugin " + pluginName)
|
||||
log.Printf("[DEBUG] Install a Docker plugin %s", pluginName)
|
||||
opts := types.PluginInstallOptions{
|
||||
RemoteRef: pluginName,
|
||||
AcceptAllPermissions: d.Get("grant_all_permissions").(bool),
|
||||
|
|
@ -69,11 +69,11 @@ func resourceDockerPluginDelete(d *schema.ResourceData, meta interface{}) error
|
|||
client := meta.(*ProviderConfig).DockerClient
|
||||
ctx := context.Background()
|
||||
pluginID := d.Id()
|
||||
log.Printf("[DEBUG] Remove a Docker plugin " + pluginID)
|
||||
log.Printf("[DEBUG] Remove a Docker plugin %s", pluginID)
|
||||
if err := client.PluginRemove(ctx, pluginID, types.PluginRemoveOptions{
|
||||
Force: d.Get("force_destroy").(bool),
|
||||
}); err != nil {
|
||||
return fmt.Errorf("remove the Docker plugin "+pluginID+": %w", err)
|
||||
return fmt.Errorf("remove the Docker plugin %s: %w", pluginID, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -176,11 +176,11 @@ func setDockerPlugin(d *schema.ResourceData, plugin *types.Plugin) {
|
|||
|
||||
func disablePlugin(ctx context.Context, d *schema.ResourceData, cl *client.Client) error {
|
||||
pluginID := d.Id()
|
||||
log.Printf("[DEBUG] Disable a Docker plugin " + pluginID)
|
||||
log.Printf("[DEBUG] Disable a Docker plugin %s", pluginID)
|
||||
if err := cl.PluginDisable(ctx, pluginID, types.PluginDisableOptions{
|
||||
Force: d.Get("force_disable").(bool),
|
||||
}); err != nil {
|
||||
return fmt.Errorf("disable the Docker plugin "+pluginID+": %w", err)
|
||||
return fmt.Errorf("disable the Docker plugin %s: %w", pluginID, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -198,7 +198,7 @@ func enablePlugin(ctx context.Context, d *schema.ResourceData, cl *client.Client
|
|||
|
||||
func pluginSet(ctx context.Context, d *schema.ResourceData, cl *client.Client) error {
|
||||
pluginID := d.Id()
|
||||
log.Printf("[DEBUG] Update settings of a Docker plugin " + pluginID)
|
||||
log.Printf("[DEBUG] Update settings of a Docker plugin %s", pluginID)
|
||||
// currently, only environment variables are supported.
|
||||
// TODO support other args
|
||||
// https://docs.docker.com/engine/reference/commandline/plugin_set/#extended-description
|
||||
|
|
|
|||
|
|
@ -334,11 +334,11 @@ func deleteDockerRegistryImage(pushOpts internalPushImageOptions, registryWithPr
|
|||
case http.StatusOK, http.StatusAccepted, http.StatusNotFound:
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("Got bad response from registry: " + resp.Status)
|
||||
return fmt.Errorf("got bad response from registry: %s", resp.Status)
|
||||
}
|
||||
// Some unexpected status was given, return an error
|
||||
default:
|
||||
return fmt.Errorf("Got bad response from registry: " + resp.Status)
|
||||
return fmt.Errorf("got bad response from registry: %s", resp.Status)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue