From 41e25b74541787db86affa51a787729bbdbd52b0 Mon Sep 17 00:00:00 2001 From: Sergei Ivanov Date: Wed, 26 Jan 2022 13:40:37 +0000 Subject: [PATCH] Upgraded to go 1.17 Signed-off-by: Sergei Ivanov --- .gitignore | 1 + Dockerfile | 6 +++--- docs/index.md | 2 +- go.mod | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 49 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 9a2e7ea..f7ec0ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ terraform-provider-gpg* /c.out +/dist/ diff --git a/Dockerfile b/Dockerfile index bd092ac..ae2d662 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15-alpine +FROM golang:1.17-alpine # Enable go modules ENV GO111MODULE=on @@ -7,7 +7,7 @@ ENV GO111MODULE=on RUN apk add curl git build-base # Install linter -RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $HOME/bin v1.44.0 +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $HOME/bin v1.44.0 # Copy go mod files first and install dependencies to cache this layer ADD ./go.mod ./go.sum /go/src/terraform-provider-gpg/ @@ -19,5 +19,5 @@ ADD . /go/src/terraform-provider-gpg # Build, test and lint RUN go build -v && \ - go test && \ + go test -v ./... && \ $HOME/bin/golangci-lint run diff --git a/docs/index.md b/docs/index.md index d4a69d5..020dc8f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,7 +11,7 @@ Managing GPG keyring or signing files is currently not implemented. ```hcl terraform { required_providers { - sshcommand = { + gpg = { source = "invidian/gpg" version = "0.3.0" } diff --git a/go.mod b/go.mod index 01401e0..ed736c4 100644 --- a/go.mod +++ b/go.mod @@ -1,28 +1,60 @@ module github.com/invidian/terraform-provider-gpg -go 1.15 +go 1.17 + +require ( + github.com/hashicorp/terraform-plugin-sdk v1.15.0 + golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de +) require ( cloud.google.com/go v0.63.0 // indirect + cloud.google.com/go/storage v1.10.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-cidr v1.1.0 // indirect + github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect + github.com/armon/go-radix v1.0.0 // indirect github.com/aws/aws-sdk-go v1.34.7 // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.9.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.4.2 // indirect + github.com/google/go-cmp v0.5.1 // indirect + github.com/google/uuid v1.1.1 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-checkpoint v0.5.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.1 // indirect github.com/hashicorp/go-getter v1.4.1 // indirect github.com/hashicorp/go-hclog v0.14.1 // indirect github.com/hashicorp/go-multierror v1.1.0 // indirect github.com/hashicorp/go-plugin v1.3.0 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/hashicorp/go-version v1.2.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl/v2 v2.6.0 // indirect - github.com/hashicorp/terraform-plugin-sdk v1.15.0 + github.com/hashicorp/logutils v1.0.0 // indirect + github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8 // indirect + github.com/hashicorp/terraform-exec v0.1.1 // indirect + github.com/hashicorp/terraform-json v0.5.0 // indirect + github.com/hashicorp/terraform-plugin-test v1.4.3 // indirect github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce // indirect + github.com/jmespath/go-jmespath v0.3.0 // indirect + github.com/jstemmer/go-junit-report v0.9.1 // indirect github.com/mattn/go-colorable v0.1.7 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect github.com/mitchellh/cli v1.1.1 // indirect + github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect + github.com/mitchellh/copystructure v1.0.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/go-wordwrap v1.0.0 // indirect github.com/mitchellh/mapstructure v1.3.3 // indirect + github.com/mitchellh/reflectwalk v1.0.1 // indirect github.com/oklog/run v1.1.0 // indirect github.com/posener/complete v1.2.3 // indirect github.com/spf13/afero v1.3.4 // indirect @@ -30,9 +62,18 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/zclconf/go-cty v1.5.1 // indirect github.com/zclconf/go-cty-yaml v1.0.2 // indirect - golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de + go.opencensus.io v0.22.4 // indirect + golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect + golang.org/x/mod v0.3.0 // indirect golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc // indirect + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect golang.org/x/sys v0.0.0-20200817155316-9781c653f443 // indirect + golang.org/x/text v0.3.3 // indirect golang.org/x/tools v0.0.0-20200818005847-188abfa75333 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/api v0.30.0 // indirect + google.golang.org/appengine v1.6.6 // indirect google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70 // indirect + google.golang.org/grpc v1.31.0 // indirect + google.golang.org/protobuf v1.25.0 // indirect )