From f4591b58bdb123a27e1e29acd3126631f4fe0d1a Mon Sep 17 00:00:00 2001 From: Volodymyr Manilo <35466116+vmanilo@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:35:54 +0100 Subject: [PATCH 1/8] Upgrade dependencies linter and testing plugin (#606) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Makefile | 2 +- go.mod | 32 +++++++++---------- go.sum | 68 ++++++++++++++++++----------------------- golangci.yml | 1 + tools/golint.Dockerfile | 2 +- 5 files changed, 48 insertions(+), 57 deletions(-) diff --git a/Makefile b/Makefile index aae54d7a..8dd77ee4 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ OS_ARCH=darwin_amd64 GOBINPATH=$(shell go env GOPATH)/bin SWEEP_TENANT=terraformtests SWEEP_FOLDER=./twingate/internal/test/sweepers -GOLINT_VERSION=v1.61.0 +GOLINT_VERSION=v1.62.0 GOSEC_VERSION=2.21.4 diff --git a/go.mod b/go.mod index 48af594b..e39dba83 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/hashicorp/terraform-plugin-framework v1.13.0 github.com/hashicorp/terraform-plugin-framework-validators v0.15.0 github.com/hashicorp/terraform-plugin-go v0.25.0 - github.com/hashicorp/terraform-plugin-testing v1.10.0 + github.com/hashicorp/terraform-plugin-testing v1.11.0 github.com/hasura/go-graphql-client v0.13.1 github.com/iancoleman/strcase v0.3.0 github.com/jarcoal/httpmock v1.3.1 @@ -22,10 +22,10 @@ require ( ) require ( - github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect + github.com/BurntSushi/toml v1.2.1 // indirect github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect github.com/agext/levenshtein v1.2.2 // indirect @@ -38,7 +38,7 @@ require ( github.com/coder/websocket v1.8.12 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dnephin/pflag v1.0.7 // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -53,18 +53,17 @@ require ( github.com/hashicorp/go-plugin v1.6.2 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/hc-install v0.9.0 // indirect - github.com/hashicorp/hcl/v2 v2.21.0 // indirect + github.com/hashicorp/hcl/v2 v2.23.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.21.0 // indirect github.com/hashicorp/terraform-json v0.23.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect - github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect + github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/huandu/xstrings v1.3.3 // indirect github.com/imdario/mergo v0.3.15 // indirect - github.com/kr/pretty v0.3.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect @@ -84,19 +83,18 @@ require ( github.com/yuin/goldmark-meta v1.1.0 // indirect github.com/zclconf/go-cty v1.15.0 // indirect go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect - golang.org/x/crypto v0.27.0 // indirect - golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/crypto v0.29.0 // indirect + golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/term v0.24.0 // indirect - golang.org/x/text v0.19.0 // indirect - golang.org/x/tools v0.25.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect + golang.org/x/tools v0.22.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.35.1 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v2 v2.3.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 681b75db..2343dac8 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,13 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0= github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= -github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -34,7 +33,6 @@ github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vc github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo= github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -46,9 +44,8 @@ github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -106,8 +103,8 @@ github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKe github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hc-install v0.9.0 h1:2dIk8LcvANwtv3QZLckxcjyF5w8KVtiMxu6G6eLhghE= github.com/hashicorp/hc-install v0.9.0/go.mod h1:+6vOP+mf3tuGgMApVYtmsnDoKWMDcFXeTxCACYZ8SFg= -github.com/hashicorp/hcl/v2 v2.21.0 h1:lve4q/o/2rqwYOgUg3y3V2YPyD1/zkCLGjIV74Jit14= -github.com/hashicorp/hcl/v2 v2.21.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= +github.com/hashicorp/hcl/v2 v2.23.0 h1:Fphj1/gCylPxHutVSEOf2fBOh1VE4AuLV7+kbJf3qos= +github.com/hashicorp/hcl/v2 v2.23.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ= @@ -124,10 +121,10 @@ github.com/hashicorp/terraform-plugin-go v0.25.0 h1:oi13cx7xXA6QciMcpcFi/rwA974r github.com/hashicorp/terraform-plugin-go v0.25.0/go.mod h1:+SYagMYadJP86Kvn+TGeV+ofr/R3g4/If0O5sO96MVw= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0/go.mod h1:sl/UoabMc37HA6ICVMmGO+/0wofkVIRxf+BMb/dnoIg= -github.com/hashicorp/terraform-plugin-testing v1.10.0 h1:2+tmRNhvnfE4Bs8rB6v58S/VpqzGC6RCh9Y8ujdn+aw= -github.com/hashicorp/terraform-plugin-testing v1.10.0/go.mod h1:iWRW3+loP33WMch2P/TEyCxxct/ZEcCGMquSLSCVsrc= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 h1:wyKCCtn6pBBL46c1uIIBNUOWlNfYXfXpVo16iDyLp8Y= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0/go.mod h1:B0Al8NyYVr8Mp/KLwssKXG1RqnTk7FySqSn4fRuLNgw= +github.com/hashicorp/terraform-plugin-testing v1.11.0 h1:MeDT5W3YHbONJt2aPQyaBsgQeAIckwPX41EUHXEn29A= +github.com/hashicorp/terraform-plugin-testing v1.11.0/go.mod h1:WNAHQ3DcgV/0J+B15WTE6hDvxcUdkPPpnB1FR3M910U= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -152,9 +149,8 @@ github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gav github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -192,12 +188,10 @@ github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= @@ -246,10 +240,10 @@ golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIi golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -273,8 +267,8 @@ golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -306,8 +300,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -320,8 +314,8 @@ golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -333,8 +327,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -344,15 +338,15 @@ golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= -golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= -golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= @@ -360,15 +354,13 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/gotestsum v1.12.0 h1:CmwtaGDkHxrZm4Ib0Vob89MTfpc3GrEFMJKovliPwGk= diff --git a/golangci.yml b/golangci.yml index 6dd0eee8..8e3d0250 100644 --- a/golangci.yml +++ b/golangci.yml @@ -70,6 +70,7 @@ linters: - lll - revive - gomoddirectives + - exportloopref disable-all: false fast: false diff --git a/tools/golint.Dockerfile b/tools/golint.Dockerfile index 0c512860..f3818e17 100644 --- a/tools/golint.Dockerfile +++ b/tools/golint.Dockerfile @@ -1,3 +1,3 @@ -FROM golangci/golangci-lint:v1.61.0 +FROM golangci/golangci-lint:v1.62.0 # Please also update GOLINT_VERSION in Makefile \ No newline at end of file From dcba0dbd0d38db6a4d03ba3afec01b90179b8681 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:51:15 +0100 Subject: [PATCH 2/8] Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#608) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: bertekintw <101608051+bertekintw@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e39dba83..d959aef1 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/jarcoal/httpmock v1.3.1 github.com/mattn/goveralls v0.0.12 github.com/mitchellh/copystructure v1.2.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 golang.org/x/sync v0.9.0 gotest.tools/gotestsum v1.12.0 ) diff --git a/go.sum b/go.sum index 2343dac8..6e0a72ea 100644 --- a/go.sum +++ b/go.sum @@ -210,8 +210,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= From d86810909c624dd1eda78304447cccf96d358dfc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 05:31:06 -0800 Subject: [PATCH 3/8] Bump github.com/hashicorp/terraform-plugin-docs from 0.20.0 to 0.20.1 (#611) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d959aef1..8accac29 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-retryablehttp v0.7.7 github.com/hashicorp/go-uuid v1.0.3 - github.com/hashicorp/terraform-plugin-docs v0.20.0 + github.com/hashicorp/terraform-plugin-docs v0.20.1 github.com/hashicorp/terraform-plugin-framework v1.13.0 github.com/hashicorp/terraform-plugin-framework-validators v0.15.0 github.com/hashicorp/terraform-plugin-go v0.25.0 diff --git a/go.sum b/go.sum index 6e0a72ea..2b564071 100644 --- a/go.sum +++ b/go.sum @@ -111,8 +111,8 @@ github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVW github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI= github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= -github.com/hashicorp/terraform-plugin-docs v0.20.0 h1:ox7rm1FN0dVZaJBUzkVVh10R1r3+FeMQWL0QopQ9d7o= -github.com/hashicorp/terraform-plugin-docs v0.20.0/go.mod h1:A/+4SVMdAkQYtIBtaxV0H7AU862TxVZk/hhKaMDQB6Y= +github.com/hashicorp/terraform-plugin-docs v0.20.1 h1:Fq7E/HrU8kuZu3hNliZGwloFWSYfWEOWnylFhYQIoys= +github.com/hashicorp/terraform-plugin-docs v0.20.1/go.mod h1:Yz6HoK7/EgzSrHPB9J/lWFzwl9/xep2OPnc5jaJDV90= github.com/hashicorp/terraform-plugin-framework v1.13.0 h1:8OTG4+oZUfKgnfTdPTJwZ532Bh2BobF4H+yBiYJ/scw= github.com/hashicorp/terraform-plugin-framework v1.13.0/go.mod h1:j64rwMGpgM3NYXTKuxrCnyubQb/4VKldEKlcG8cvmjU= github.com/hashicorp/terraform-plugin-framework-validators v0.15.0 h1:RXMmu7JgpFjnI1a5QjMCBb11usrW2OtAG+iOTIj5c9Y= From 828315a7f5b374ff1ae87d615fe20af67367eb55 Mon Sep 17 00:00:00 2001 From: Volodymyr Manilo <35466116+vmanilo@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:30:55 +0100 Subject: [PATCH 4/8] Feature: add connector metadata to twingate connector resource and data structure (#607) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bob Lee --- docs/data-sources/connector.md | 5 +++ docs/data-sources/connectors.md | 5 +++ docs/resources/connector.md | 5 +++ twingate/internal/attr/connector.go | 4 +++ .../internal/client/query/connector-read.go | 10 ++++++ twingate/internal/model/connector.go | 10 ++++++ .../internal/provider/datasource/connector.go | 32 +++++++++++++++++++ .../provider/datasource/connectors.go | 22 +++++++++++++ .../internal/provider/datasource/converter.go | 16 ++++------ .../provider/datasource/converter_test.go | 8 ++++- .../datasource/dns-filtering-profile.go | 3 +- .../internal/provider/resource/connector.go | 32 +++++++++++++++++++ .../acctests/datasource/connector_test.go | 21 ++++++++++++ .../acctests/datasource/connectors_test.go | 5 +++ .../test/acctests/resource/connector_test.go | 1 + .../internal/test/client/connector_test.go | 18 +++++++++-- .../internal/test/models/connector_test.go | 15 +++++++++ twingate/internal/test/utils/utils_test.go | 32 +++++++++++++++++++ twingate/internal/utils/utils.go | 9 ++++++ 19 files changed, 238 insertions(+), 15 deletions(-) diff --git a/docs/data-sources/connector.md b/docs/data-sources/connector.md index 4c4fa0b4..49aa43a2 100644 --- a/docs/data-sources/connector.md +++ b/docs/data-sources/connector.md @@ -27,6 +27,11 @@ data "twingate_connector" "foo" { ### Read-Only +- `hostname` (String) The hostname of the machine hosting the Connector. - `name` (String) The name of the Connector. +- `private_ips` (Set of String) The Connector's private IP addresses. +- `public_ip` (String) The Connector's public IP address. - `remote_network_id` (String) The ID of the Remote Network the Connector is attached to. +- `state` (String) The Connector's state. One of `ALIVE`, `DEAD_NO_HEARTBEAT`, `DEAD_HEARTBEAT_TOO_OLD` or `DEAD_NO_RELAYS`. - `status_updates_enabled` (Boolean) Determines whether status notifications are enabled for the Connector. +- `version` (String) The Connector's version. diff --git a/docs/data-sources/connectors.md b/docs/data-sources/connectors.md index 1c2e4360..4c1df6d2 100644 --- a/docs/data-sources/connectors.md +++ b/docs/data-sources/connectors.md @@ -45,7 +45,12 @@ data "twingate_connectors" "all" { Read-Only: +- `hostname` (String) The hostname of the machine hosting the Connector. - `id` (String) The ID of the Connector. - `name` (String) The Name of the Connector. +- `private_ips` (Set of String) The Connector's private IP addresses. +- `public_ip` (String) The Connector's public IP address. - `remote_network_id` (String) The ID of the Remote Network attached to the Connector. +- `state` (String) The Connector's state. One of `ALIVE`, `DEAD_NO_HEARTBEAT`, `DEAD_HEARTBEAT_TOO_OLD` or `DEAD_NO_RELAYS`. - `status_updates_enabled` (Boolean) Determines whether status notifications are enabled for the Connector. +- `version` (String) The Connector's version. diff --git a/docs/resources/connector.md b/docs/resources/connector.md index fcafcc75..64a3c91d 100644 --- a/docs/resources/connector.md +++ b/docs/resources/connector.md @@ -42,7 +42,12 @@ resource "twingate_connector" "aws_connector" { ### Read-Only +- `hostname` (String) The hostname of the machine hosting the Connector. - `id` (String) Autogenerated ID of the Connector, encoded in base64. +- `private_ips` (Set of String) The Connector's private IP addresses. +- `public_ip` (String) The Connector's public IP address. +- `state` (String) The Connector's state. One of `ALIVE`, `DEAD_NO_HEARTBEAT`, `DEAD_HEARTBEAT_TOO_OLD` or `DEAD_NO_RELAYS`. +- `version` (String) The Connector's version. ## Import diff --git a/twingate/internal/attr/connector.go b/twingate/internal/attr/connector.go index c56fa3af..c66d2dc7 100644 --- a/twingate/internal/attr/connector.go +++ b/twingate/internal/attr/connector.go @@ -3,4 +3,8 @@ package attr const ( StatusUpdatesEnabled = "status_updates_enabled" Connectors = "connectors" + Hostname = "hostname" + Version = "version" + PublicIP = "public_ip" + PrivateIPs = "private_ips" ) diff --git a/twingate/internal/client/query/connector-read.go b/twingate/internal/client/query/connector-read.go index 86a98b4b..c46d9dfc 100644 --- a/twingate/internal/client/query/connector-read.go +++ b/twingate/internal/client/query/connector-read.go @@ -15,6 +15,11 @@ type gqlConnector struct { ID graphql.ID } HasStatusNotificationsEnabled bool + Hostname string + State string + Version string + PublicIP string `graphql:"publicIP"` + PrivateIPs []string `graphql:"privateIPs"` } func (q ReadConnector) IsEmpty() bool { @@ -35,5 +40,10 @@ func (c gqlConnector) ToModel() *model.Connector { Name: c.Name, NetworkID: string(c.RemoteNetwork.ID), StatusUpdatesEnabled: &c.HasStatusNotificationsEnabled, + State: c.State, + Hostname: c.Hostname, + Version: c.Version, + PublicIP: c.PublicIP, + PrivateIPs: c.PrivateIPs, } } diff --git a/twingate/internal/model/connector.go b/twingate/internal/model/connector.go index 9f18c00c..403739c7 100644 --- a/twingate/internal/model/connector.go +++ b/twingate/internal/model/connector.go @@ -7,6 +7,11 @@ type Connector struct { Name string NetworkID string StatusUpdatesEnabled *bool + State string + Version string + Hostname string + PublicIP string + PrivateIPs []string } func (c Connector) GetName() string { @@ -23,5 +28,10 @@ func (c Connector) ToTerraform() interface{} { attr.Name: c.Name, attr.RemoteNetworkID: c.NetworkID, attr.StatusUpdatesEnabled: *c.StatusUpdatesEnabled, + attr.State: c.State, + attr.Version: c.Version, + attr.Hostname: c.Hostname, + attr.PublicIP: c.PublicIP, + attr.PrivateIPs: c.PrivateIPs, } } diff --git a/twingate/internal/provider/datasource/connector.go b/twingate/internal/provider/datasource/connector.go index a4dd68ef..0e2b79ef 100644 --- a/twingate/internal/provider/datasource/connector.go +++ b/twingate/internal/provider/datasource/connector.go @@ -6,6 +6,7 @@ import ( "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/attr" "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/client" + "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/utils" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" @@ -27,6 +28,11 @@ type connectorModel struct { Name types.String `tfsdk:"name"` RemoteNetworkID types.String `tfsdk:"remote_network_id"` StatusUpdatesEnabled types.Bool `tfsdk:"status_updates_enabled"` + State types.String `tfsdk:"state"` + Hostname types.String `tfsdk:"hostname"` + Version types.String `tfsdk:"version"` + PublicIP types.String `tfsdk:"public_ip"` + PrivateIPs types.Set `tfsdk:"private_ips"` } func (d *connector) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { @@ -72,6 +78,27 @@ func (d *connector) Schema(ctx context.Context, req datasource.SchemaRequest, re Computed: true, Description: "Determines whether status notifications are enabled for the Connector.", }, + attr.State: schema.StringAttribute{ + Computed: true, + Description: "The Connector's state. One of `ALIVE`, `DEAD_NO_HEARTBEAT`, `DEAD_HEARTBEAT_TOO_OLD` or `DEAD_NO_RELAYS`.", + }, + attr.Hostname: schema.StringAttribute{ + Computed: true, + Description: "The hostname of the machine hosting the Connector.", + }, + attr.Version: schema.StringAttribute{ + Computed: true, + Description: "The Connector's version.", + }, + attr.PublicIP: schema.StringAttribute{ + Computed: true, + Description: "The Connector's public IP address.", + }, + attr.PrivateIPs: schema.SetAttribute{ + Computed: true, + ElementType: types.StringType, + Description: "The Connector's private IP addresses.", + }, }, } } @@ -96,6 +123,11 @@ func (d *connector) Read(ctx context.Context, req datasource.ReadRequest, resp * data.Name = types.StringValue(connector.Name) data.RemoteNetworkID = types.StringValue(connector.NetworkID) data.StatusUpdatesEnabled = types.BoolPointerValue(connector.StatusUpdatesEnabled) + data.State = types.StringValue(connector.State) + data.Version = types.StringValue(connector.Version) + data.Hostname = types.StringValue(connector.Hostname) + data.PublicIP = types.StringValue(connector.PublicIP) + data.PrivateIPs = utils.MakeStringSet(connector.PrivateIPs) // Save data into Terraform state resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) diff --git a/twingate/internal/provider/datasource/connectors.go b/twingate/internal/provider/datasource/connectors.go index cd4b9fc0..cf5784a2 100644 --- a/twingate/internal/provider/datasource/connectors.go +++ b/twingate/internal/provider/datasource/connectors.go @@ -58,6 +58,7 @@ func (d *connectors) Configure(ctx context.Context, req datasource.ConfigureRequ d.client = client } +//nolint:funlen func (d *connectors) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ Description: "Connectors provide connectivity to Remote Networks. For more information, see Twingate's [documentation](https://docs.twingate.com/docs/understanding-access-nodes).", @@ -114,6 +115,27 @@ func (d *connectors) Schema(ctx context.Context, req datasource.SchemaRequest, r Computed: true, Description: "Determines whether status notifications are enabled for the Connector.", }, + attr.State: schema.StringAttribute{ + Computed: true, + Description: "The Connector's state. One of `ALIVE`, `DEAD_NO_HEARTBEAT`, `DEAD_HEARTBEAT_TOO_OLD` or `DEAD_NO_RELAYS`.", + }, + attr.Hostname: schema.StringAttribute{ + Computed: true, + Description: "The hostname of the machine hosting the Connector.", + }, + attr.Version: schema.StringAttribute{ + Computed: true, + Description: "The Connector's version.", + }, + attr.PublicIP: schema.StringAttribute{ + Computed: true, + Description: "The Connector's public IP address.", + }, + attr.PrivateIPs: schema.SetAttribute{ + Computed: true, + ElementType: types.StringType, + Description: "The Connector's private IP addresses.", + }, }, }, }, diff --git a/twingate/internal/provider/datasource/converter.go b/twingate/internal/provider/datasource/converter.go index d43c3652..b72f39be 100644 --- a/twingate/internal/provider/datasource/converter.go +++ b/twingate/internal/provider/datasource/converter.go @@ -3,7 +3,6 @@ package datasource import ( "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/model" "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/utils" - "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -13,6 +12,11 @@ func convertConnectorsToTerraform(connectors []*model.Connector) []connectorMode Name: types.StringValue(connector.Name), RemoteNetworkID: types.StringValue(connector.NetworkID), StatusUpdatesEnabled: types.BoolPointerValue(connector.StatusUpdatesEnabled), + State: types.StringValue(connector.State), + Version: types.StringValue(connector.Version), + Hostname: types.StringValue(connector.Hostname), + PublicIP: types.StringValue(connector.PublicIP), + PrivateIPs: utils.MakeStringSet(connector.PrivateIPs), } }) } @@ -86,14 +90,6 @@ func convertRemoteNetworksToTerraform(networks []*model.RemoteNetwork) []remoteN func convertDomainsToTerraform(domains []string) *domainsModel { return &domainsModel{ - Domains: convertStringListToSet(domains), + Domains: utils.MakeStringSet(domains), } } - -func convertStringListToSet(items []string) types.Set { - values := utils.Map(items, func(item string) attr.Value { - return types.StringValue(item) - }) - - return types.SetValueMust(types.StringType, values) -} diff --git a/twingate/internal/provider/datasource/converter_test.go b/twingate/internal/provider/datasource/converter_test.go index 278d2cd9..1604404f 100644 --- a/twingate/internal/provider/datasource/converter_test.go +++ b/twingate/internal/provider/datasource/converter_test.go @@ -2,6 +2,7 @@ package datasource import ( "fmt" + "github.com/hashicorp/terraform-plugin-framework/attr" "testing" "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/model" @@ -26,13 +27,18 @@ func TestConverterConnectorsToTerraform(t *testing.T) { }, { input: []*model.Connector{ - {ID: "connector-id", Name: "connector-name", NetworkID: "network-id", StatusUpdatesEnabled: &boolTrue}, + {ID: "connector-id", Name: "connector-name", NetworkID: "network-id", StatusUpdatesEnabled: &boolTrue, State: "ALIVE"}, }, expected: []connectorModel{ { Name: types.StringValue("connector-name"), RemoteNetworkID: types.StringValue("network-id"), StatusUpdatesEnabled: types.BoolValue(true), + State: types.StringValue("ALIVE"), + Hostname: types.StringValue(""), + Version: types.StringValue(""), + PublicIP: types.StringValue(""), + PrivateIPs: types.SetValueMust(types.StringType, []attr.Value{}), }, }, }, diff --git a/twingate/internal/provider/datasource/dns-filtering-profile.go b/twingate/internal/provider/datasource/dns-filtering-profile.go index 3c159748..7f2f0143 100644 --- a/twingate/internal/provider/datasource/dns-filtering-profile.go +++ b/twingate/internal/provider/datasource/dns-filtering-profile.go @@ -6,6 +6,7 @@ import ( "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/attr" "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/client" + "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/utils" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" @@ -268,7 +269,7 @@ func (d *dnsFilteringProfile) Read(ctx context.Context, req datasource.ReadReque data.FallbackMethod = types.StringValue(profile.FallbackMethod) data.AllowedDomains = convertDomainsToTerraform(profile.AllowedDomains) data.DeniedDomains = convertDomainsToTerraform(profile.DeniedDomains) - data.Groups = convertStringListToSet(profile.Groups) + data.Groups = utils.MakeStringSet(profile.Groups) if profile.PrivacyCategories != nil { data.PrivacyCategories = &privacyCategoriesModel{ diff --git a/twingate/internal/provider/resource/connector.go b/twingate/internal/provider/resource/connector.go index 7f939e9c..8ce784a8 100644 --- a/twingate/internal/provider/resource/connector.go +++ b/twingate/internal/provider/resource/connector.go @@ -7,6 +7,7 @@ import ( "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/attr" "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/client" "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/model" + "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/utils" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -36,6 +37,11 @@ type connectorModel struct { Name types.String `tfsdk:"name"` RemoteNetworkID types.String `tfsdk:"remote_network_id"` StatusUpdatesEnabled types.Bool `tfsdk:"status_updates_enabled"` + State types.String `tfsdk:"state"` + Hostname types.String `tfsdk:"hostname"` + Version types.String `tfsdk:"version"` + PublicIP types.String `tfsdk:"public_ip"` + PrivateIPs types.Set `tfsdk:"private_ips"` } func (r *connector) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { @@ -101,6 +107,27 @@ func (r *connector) Schema(_ context.Context, _ resource.SchemaRequest, resp *re stringplanmodifier.UseStateForUnknown(), }, }, + attr.State: schema.StringAttribute{ + Computed: true, + Description: "The Connector's state. One of `ALIVE`, `DEAD_NO_HEARTBEAT`, `DEAD_HEARTBEAT_TOO_OLD` or `DEAD_NO_RELAYS`.", + }, + attr.Hostname: schema.StringAttribute{ + Computed: true, + Description: "The hostname of the machine hosting the Connector.", + }, + attr.Version: schema.StringAttribute{ + Computed: true, + Description: "The Connector's version.", + }, + attr.PublicIP: schema.StringAttribute{ + Computed: true, + Description: "The Connector's public IP address.", + }, + attr.PrivateIPs: schema.SetAttribute{ + Computed: true, + ElementType: types.StringType, + Description: "The Connector's private IP addresses.", + }, }, } } @@ -198,6 +225,11 @@ func (r *connector) helper(ctx context.Context, conn *model.Connector, state *co state.Name = types.StringValue(conn.Name) state.RemoteNetworkID = types.StringValue(conn.NetworkID) state.StatusUpdatesEnabled = types.BoolPointerValue(conn.StatusUpdatesEnabled) + state.State = types.StringValue(conn.State) + state.Version = types.StringValue(conn.Version) + state.Hostname = types.StringValue(conn.Hostname) + state.PublicIP = types.StringValue(conn.PublicIP) + state.PrivateIPs = utils.MakeStringSet(conn.PrivateIPs) // Set refreshed state diags := respState.Set(ctx, state) diff --git a/twingate/internal/test/acctests/datasource/connector_test.go b/twingate/internal/test/acctests/datasource/connector_test.go index 95381d35..482f502a 100644 --- a/twingate/internal/test/acctests/datasource/connector_test.go +++ b/twingate/internal/test/acctests/datasource/connector_test.go @@ -28,6 +28,10 @@ func TestAccDatasourceTwingateConnector_basic(t *testing.T) { Check: acctests.ComposeTestCheckFunc( resource.TestCheckOutput("my_connector", connectorName), resource.TestCheckOutput("my_connector_notification_status", "true"), + resource.TestCheckOutput("my_connector_state", "DEAD_NO_HEARTBEAT"), + resource.TestCheckOutput("my_connector_version", ""), + resource.TestCheckOutput("my_connector_hostname", ""), + resource.TestCheckOutput("my_connector_public_ip", ""), ), }, }, @@ -55,6 +59,23 @@ func testDatasourceTwingateConnector(remoteNetworkName, connectorName string) st output "my_connector_notification_status" { value = data.twingate_connector.out_dc1.status_updates_enabled } + + output "my_connector_state" { + value = data.twingate_connector.out_dc1.state + } + + output "my_connector_version" { + value = data.twingate_connector.out_dc1.version + } + + output "my_connector_hostname" { + value = data.twingate_connector.out_dc1.hostname + } + + output "my_connector_public_ip" { + value = data.twingate_connector.out_dc1.public_ip + } + `, remoteNetworkName, connectorName) } diff --git a/twingate/internal/test/acctests/datasource/connectors_test.go b/twingate/internal/test/acctests/datasource/connectors_test.go index 206bf64d..3122dc3c 100644 --- a/twingate/internal/test/acctests/datasource/connectors_test.go +++ b/twingate/internal/test/acctests/datasource/connectors_test.go @@ -36,6 +36,11 @@ func TestAccDatasourceTwingateConnectors_basic(t *testing.T) { testCheckOutputLength("my_connectors", 2), testCheckOutputAttr("my_connectors", 0, attr.Name, connectorName), testCheckOutputAttr("my_connectors", 0, attr.StatusUpdatesEnabled, true), + testCheckOutputAttr("my_connectors", 0, attr.State, "DEAD_NO_HEARTBEAT"), + testCheckOutputAttr("my_connectors", 0, attr.Hostname, ""), + testCheckOutputAttr("my_connectors", 0, attr.Version, ""), + testCheckOutputAttr("my_connectors", 0, attr.PublicIP, ""), + testCheckOutputAttr("my_connectors", 0, attr.PrivateIPs, []any{}), ), }, }, diff --git a/twingate/internal/test/acctests/resource/connector_test.go b/twingate/internal/test/acctests/resource/connector_test.go index 9996c396..0bfb18ad 100644 --- a/twingate/internal/test/acctests/resource/connector_test.go +++ b/twingate/internal/test/acctests/resource/connector_test.go @@ -30,6 +30,7 @@ func TestAccRemoteConnectorCreate(t *testing.T) { Check: acctests.ComposeTestCheckFunc( checkTwingateConnectorSetWithRemoteNetwork(theResource, acctests.TerraformRemoteNetwork(terraformResourceName)), sdk.TestCheckResourceAttrSet(theResource, attr.Name), + sdk.TestCheckResourceAttrSet(theResource, attr.State), ), }, }, diff --git a/twingate/internal/test/client/connector_test.go b/twingate/internal/test/client/connector_test.go index 84371834..12fd40a3 100644 --- a/twingate/internal/test/client/connector_test.go +++ b/twingate/internal/test/client/connector_test.go @@ -23,6 +23,7 @@ func TestClientConnectorCreateOk(t *testing.T) { Name: "test-name", NetworkID: "remote-network-id", StatusUpdatesEnabled: ¬ificationEnabled, + State: "DEAD_NO_HEARTBEAT", } jsonResponse := `{ @@ -31,6 +32,7 @@ func TestClientConnectorCreateOk(t *testing.T) { "entity": { "id": "test-id", "name": "test-name", + "state": "DEAD_NO_HEARTBEAT", "hasStatusNotificationsEnabled": true, "remoteNetwork": { "id": "remote-network-id" @@ -61,6 +63,7 @@ func TestClientConnectorCreateWithNotificationStatusOk(t *testing.T) { Name: "test-name", NetworkID: "remote-network-id", StatusUpdatesEnabled: ¬ificationEnabled, + State: "DEAD_NO_HEARTBEAT", } jsonResponse := `{ @@ -69,6 +72,7 @@ func TestClientConnectorCreateWithNotificationStatusOk(t *testing.T) { "entity": { "id": "test-id", "name": "test-name", + "state": "DEAD_NO_HEARTBEAT", "hasStatusNotificationsEnabled": true, "remoteNetwork": { "id": "remote-network-id" @@ -456,6 +460,11 @@ func TestClientConnectorReadOk(t *testing.T) { ID: "test-id", Name: "test-name", StatusUpdatesEnabled: ¬ificationEnabled, + State: "ALIVE", + Hostname: "test-hostname", + Version: "test-version", + PublicIP: "test-public-ip", + PrivateIPs: []string{"test-private-ip"}, } jsonResponse := `{ @@ -463,7 +472,12 @@ func TestClientConnectorReadOk(t *testing.T) { "connector": { "id": "test-id", "name": "test-name", - "hasStatusNotificationsEnabled": true + "hasStatusNotificationsEnabled": true, + "state": "ALIVE", + "hostname": "test-hostname", + "version": "test-version", + "publicIP": "test-public-ip", + "privateIPs": ["test-private-ip"] } } }` @@ -726,8 +740,6 @@ func TestClientConnectorReadRequestError(t *testing.T) { }) } -// readConnectorsWithRemoteNetwork - func TestClientReadConnectorsWithRemoteNetworkOk(t *testing.T) { t.Run("Test Twingate Resource : Read All Client Connectors with remote network - Ok", func(t *testing.T) { expected := []*model.Connector{ diff --git a/twingate/internal/test/models/connector_test.go b/twingate/internal/test/models/connector_test.go index e7449292..642bd162 100644 --- a/twingate/internal/test/models/connector_test.go +++ b/twingate/internal/test/models/connector_test.go @@ -31,6 +31,11 @@ func TestConnectorModel(t *testing.T) { attr.Name: "", attr.RemoteNetworkID: "", attr.StatusUpdatesEnabled: false, + attr.State: "", + attr.Version: "", + attr.Hostname: "", + attr.PublicIP: "", + attr.PrivateIPs: []string(nil), }, }, { @@ -39,6 +44,11 @@ func TestConnectorModel(t *testing.T) { Name: "name", NetworkID: "network-id", StatusUpdatesEnabled: &boolTrue, + State: "DEAD_NO_HEARTBEAT", + Version: "0.1", + Hostname: "127.0.0.1", + PublicIP: "127.0.0.1", + PrivateIPs: []string{"127.0.0.1"}, }, expectedID: "id", expectedName: "name", @@ -47,6 +57,11 @@ func TestConnectorModel(t *testing.T) { attr.Name: "name", attr.RemoteNetworkID: "network-id", attr.StatusUpdatesEnabled: true, + attr.State: "DEAD_NO_HEARTBEAT", + attr.Version: "0.1", + attr.Hostname: "127.0.0.1", + attr.PublicIP: "127.0.0.1", + attr.PrivateIPs: []string{"127.0.0.1"}, }, }, } diff --git a/twingate/internal/test/utils/utils_test.go b/twingate/internal/test/utils/utils_test.go index 6cab3c30..5f8f4611 100644 --- a/twingate/internal/test/utils/utils_test.go +++ b/twingate/internal/test/utils/utils_test.go @@ -2,6 +2,8 @@ package utils import ( "fmt" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" "testing" "github.com/Twingate/terraform-provider-twingate/v3/twingate/internal/utils" @@ -131,3 +133,33 @@ func TestDocList(t *testing.T) { }) } } + +func TestMakeStringSet(t *testing.T) { + type testCase struct { + items []string + expected types.Set + } + + cases := []testCase{ + { + items: []string{}, + expected: types.SetValueMust(types.StringType, []attr.Value{}), + }, + { + items: []string{"1", "2", "3"}, + expected: types.SetValueMust(types.StringType, []attr.Value{ + types.StringValue("1"), + types.StringValue("2"), + types.StringValue("3"), + }), + }, + } + + for n, c := range cases { + t.Run(fmt.Sprintf("case: %d", n), func(t *testing.T) { + actual := utils.MakeStringSet(c.items) + + assert.Equal(t, c.expected, actual) + }) + } +} diff --git a/twingate/internal/utils/utils.go b/twingate/internal/utils/utils.go index 00bfbb1a..87ea8d38 100644 --- a/twingate/internal/utils/utils.go +++ b/twingate/internal/utils/utils.go @@ -3,6 +3,9 @@ package utils import ( "fmt" "strings" + + tfattr "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" ) // Map - transform giving slice of items by applying the func. @@ -75,3 +78,9 @@ func DocList(items []string) string { return fmt.Sprintf("%s or %s", strings.Join(items[:n-1], ", "), last) } } + +func MakeStringSet(values []string) types.Set { + return types.SetValueMust(types.StringType, Map(values, func(value string) tfattr.Value { + return types.StringValue(value) + })) +} From ec4b2a4be83476ee3bc0fb37cab54cb530ca598f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 21:38:12 +0100 Subject: [PATCH 5/8] Bump golangci/golangci-lint from v1.62.0 to v1.62.2 in /tools (#609) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: bertekintw <101608051+bertekintw@users.noreply.github.com> Co-authored-by: Birol Ertekin --- Makefile | 2 +- tools/golint.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8dd77ee4..438665fa 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ OS_ARCH=darwin_amd64 GOBINPATH=$(shell go env GOPATH)/bin SWEEP_TENANT=terraformtests SWEEP_FOLDER=./twingate/internal/test/sweepers -GOLINT_VERSION=v1.62.0 +GOLINT_VERSION=v1.62.2 GOSEC_VERSION=2.21.4 diff --git a/tools/golint.Dockerfile b/tools/golint.Dockerfile index f3818e17..69b722b8 100644 --- a/tools/golint.Dockerfile +++ b/tools/golint.Dockerfile @@ -1,3 +1,3 @@ -FROM golangci/golangci-lint:v1.62.0 +FROM golangci/golangci-lint:v1.62.2 # Please also update GOLINT_VERSION in Makefile \ No newline at end of file From 32e9dd5b8cf2c343382aa723213bfc65732e6c2a Mon Sep 17 00:00:00 2001 From: alexb-twingate <110070580+alexb-twingate@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:14:42 -0800 Subject: [PATCH 6/8] Add issue templates (#613) --- .github/ISSUE_TEMPLATE/1-bug.yml | 59 ++++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/2-feature.yml | 35 +++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++++ 3 files changed, 102 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/1-bug.yml create mode 100644 .github/ISSUE_TEMPLATE/2-feature.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml new file mode 100644 index 00000000..71652748 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -0,0 +1,59 @@ +name: Bug Report +description: Report a bug related to Twingate's Terraform provider +title: "[Bug] " +labels: ["bug", "triage"] +body: + - type: markdown + attributes: + value: | + Report a bug related to Twingate's Terraform provider. + - type: input + id: summary + attributes: + label: Summary + description: In 1-sentence, what happened? + placeholder: Terraform set my laptop on fire + validations: + required: true + - type: textarea + id: what-happened + attributes: + label: What happened? + description: What did you expect to happen? + placeholder: Describe what happened + value: | + ### Steps to reproduce + + ### Actual outcome + + ### Expected outcome + validations: + required: true + - type: input + id: provider-version + attributes: + label: Twingate provider version + description: Your provider version + placeholder: v3.0.0 + validations: + required: true + - type: input + id: terraform-version + attributes: + label: Terraform version + description: Output of `terraform -v` + placeholder: Terraform v1.10.0 + validations: + required: true + - type: textarea + id: terraform-output + attributes: + label: Terraform output + description: Any relevant Terraform output (formatted as shell output) + render: shell + - type: textarea + id: additional-information + attributes: + label: Additional information + description: Any additional information you think may be helpful + diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml new file mode 100644 index 00000000..f9097f0b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -0,0 +1,35 @@ +name: Bug Report +description: Propose a new feature for Twingate's Terraform provider +title: "[Feature] " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Propose a new feature for Twingate's Terraform provider. + - type: input + id: summary + attributes: + label: Summary + description: In 1-sentence, describe your feature request + placeholder: Order a pizza using Terraform + validations: + required: true + - type: textarea + id: details + attributes: + label: Rationale + description: Why is this useful? How should it work? + placeholder: Tell us more! + value: | + ### Why this is useful + + ### How it should work + validations: + required: true + - type: textarea + id: additional-information + attributes: + label: Additional information + description: Any additional information you think may be helpful + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..b0142951 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: "Twingate's Support Forum" + url: https://forum.twingate.com/ + about: "Join us for questions, answers or twingate related chat. Please do create issues on Github for better collaboration." + - name: "Twingate Support" + url: https://help.twingate.com/ + about: "Please ask and answer questions here for async response." From db06bacceb9357709767401f919690d63da7e179 Mon Sep 17 00:00:00 2001 From: alexb-twingate <110070580+alexb-twingate@users.noreply.github.com> Date: Wed, 4 Dec 2024 09:09:56 -0800 Subject: [PATCH 7/8] Fix issue names (#614) --- .github/ISSUE_TEMPLATE/2-feature.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index f9097f0b..3bec7c61 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -1,4 +1,4 @@ -name: Bug Report +name: Feature Request description: Propose a new feature for Twingate's Terraform provider title: "[Feature] " labels: ["enhancement"] From 29ef9af94bcaa47366d8fbfaaffe69f973c98b80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:50:30 +0100 Subject: [PATCH 8/8] Bump golang.org/x/sync from 0.9.0 to 0.10.0 (#615) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8accac29..350323be 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/mattn/goveralls v0.0.12 github.com/mitchellh/copystructure v1.2.0 github.com/stretchr/testify v1.10.0 - golang.org/x/sync v0.9.0 + golang.org/x/sync v0.10.0 gotest.tools/gotestsum v1.12.0 ) diff --git a/go.sum b/go.sum index 2b564071..086fcafa 100644 --- a/go.sum +++ b/go.sum @@ -275,8 +275,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=