diff --git a/.github/aur/flux-go/PKGBUILD.template b/.github/aur/flux-go/PKGBUILD.template
index f9082627898f19d82c4d450f28294e25270d1623..b92e3a3d8c4e5df38afe6a6cbd47a8b3e7bd5879 100644
--- a/.github/aur/flux-go/PKGBUILD.template
+++ b/.github/aur/flux-go/PKGBUILD.template
@@ -12,7 +12,7 @@ provides=("flux-bin")
 conflicts=("flux-bin")
 replaces=("flux-cli")
 depends=("glibc")
-makedepends=('go>=1.16', 'kustomize>=3.0')
+makedepends=('go>=1.17', 'kustomize>=3.0')
 optdepends=('bash-completion: auto-completion for flux in Bash',
 'zsh-completions: auto-completion for flux in ZSH')
 source=(
diff --git a/.github/aur/flux-scm/PKGBUILD.template b/.github/aur/flux-scm/PKGBUILD.template
index c22a5c6e72cbf05d7d6f8bb5ee88ee6d7bbc4655..5fc391357e661e52eb29781f87ac476edaf9bdb6 100644
--- a/.github/aur/flux-scm/PKGBUILD.template
+++ b/.github/aur/flux-scm/PKGBUILD.template
@@ -11,7 +11,7 @@ license=("APACHE")
 provides=("flux-bin")
 conflicts=("flux-bin")
 depends=("glibc")
-makedepends=('go>=1.16', 'kustomize>=3.0')
+makedepends=('go>=1.17', 'kustomize>=3.0')
 optdepends=('bash-completion: auto-completion for flux in Bash',
 'zsh-completions: auto-completion for flux in ZSH')
 source=(
diff --git a/.github/workflows/bootstrap.yaml b/.github/workflows/bootstrap.yaml
index 5b2f96661c1bbbd2b40896bce7bf7a8abda56f3e..b20c2669ac5179f7accee2f644febff5f3dfb5ce 100644
--- a/.github/workflows/bootstrap.yaml
+++ b/.github/workflows/bootstrap.yaml
@@ -17,13 +17,13 @@ jobs:
         uses: actions/cache@v1
         with:
           path: ~/go/pkg/mod
-          key: ${{ runner.os }}-go1.16-${{ hashFiles('**/go.sum') }}
+          key: ${{ runner.os }}-go1.17-${{ hashFiles('**/go.sum') }}
           restore-keys: |
-            ${{ runner.os }}-go1.16-
+            ${{ runner.os }}-go1.17-
       - name: Setup Go
         uses: actions/setup-go@v2
         with:
-          go-version: 1.16.x
+          go-version: 1.17.x
       - name: Setup Kubernetes
         uses: engineerd/setup-kind@v0.5.0
         with:
diff --git a/.github/workflows/e2e-arm64.yaml b/.github/workflows/e2e-arm64.yaml
index 8f219adcc872648ca01d8ed8dc9cab6349bdd614..5855e30bd29dfdcfcdd244602366a4aa6f196f4f 100644
--- a/.github/workflows/e2e-arm64.yaml
+++ b/.github/workflows/e2e-arm64.yaml
@@ -16,7 +16,7 @@ jobs:
       - name: Setup Go
         uses: actions/setup-go@v2
         with:
-          go-version: 1.16.x
+          go-version: 1.17.x
       - name: Prepare
         id: prep
         run: |
diff --git a/.github/workflows/e2e-azure.yaml b/.github/workflows/e2e-azure.yaml
index d5dbd31e0d55eec372574f9341e5ff9184d01d7b..75abf7ef8eacab42687ed2e5dd0adbad87af0953 100644
--- a/.github/workflows/e2e-azure.yaml
+++ b/.github/workflows/e2e-azure.yaml
@@ -17,13 +17,13 @@ jobs:
         uses: actions/cache@v1
         with:
           path: ~/go/pkg/mod
-          key: ${{ runner.os }}-go1.16-${{ hashFiles('**/go.sum') }}
+          key: ${{ runner.os }}-go1.17-${{ hashFiles('**/go.sum') }}
           restore-keys: |
-            ${{ runner.os }}-go1.16-
+            ${{ runner.os }}-go1.17-
       - name: Setup Go
         uses: actions/setup-go@v2
         with:
-          go-version: 1.16.x
+          go-version: 1.17.x
       - name: Install libgit2
         run: |
           sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml
index dbcfe82ccc24a6da06925ec4b3163f24b6608667..83e6eb569bcd7e51dc860900af1b48968e751e7f 100644
--- a/.github/workflows/e2e.yaml
+++ b/.github/workflows/e2e.yaml
@@ -16,13 +16,13 @@ jobs:
         uses: actions/cache@v1
         with:
           path: ~/go/pkg/mod
-          key: ${{ runner.os }}-go1.16-${{ hashFiles('**/go.sum') }}
+          key: ${{ runner.os }}-go1.17-${{ hashFiles('**/go.sum') }}
           restore-keys: |
-            ${{ runner.os }}-go1.16-
+            ${{ runner.os }}-go1.17-
       - name: Setup Go
         uses: actions/setup-go@v2
         with:
-          go-version: 1.16.x
+          go-version: 1.17.x
       - name: Setup Kubernetes
         uses: engineerd/setup-kind@v0.5.0
         with:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 6c599da582e1aec186f62fa3e03dc8b28ea31880..dd50db0bb07ff46c851b50467c309bc89e2c3279 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -15,7 +15,7 @@ jobs:
       - name: Setup Go
         uses: actions/setup-go@v2
         with:
-          go-version: 1.16.x
+          go-version: 1.17.x
       - name: Setup QEMU
         uses: docker/setup-qemu-action@v1
         with:
diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml
index 5c310446b540f34aa6bf1858ed9889e3a8a622f9..bb815fddd16867517c11da99a96e01de327613c0 100644
--- a/.github/workflows/update.yaml
+++ b/.github/workflows/update.yaml
@@ -16,7 +16,7 @@ jobs:
       - name: Setup Go
         uses: actions/setup-go@v2
         with:
-          go-version: 1.16.x
+          go-version: 1.17.x
       - name: Update component versions
         id: update
         run: |
diff --git a/Dockerfile b/Dockerfile
index 438dbac68dbb21d7725af3117a7627a5fe0b1a69..7517c50061dd37c3a994fa7ff606e4d8ecdc39da 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.14 as builder
+FROM alpine:3.15 as builder
 
 RUN apk add --no-cache ca-certificates curl
 
@@ -9,7 +9,7 @@ RUN curl -sL https://storage.googleapis.com/kubernetes-release/release/v${KUBECT
     -o /usr/local/bin/kubectl && chmod +x /usr/local/bin/kubectl && \
     kubectl version --client=true
 
-FROM alpine:3.14 as flux-cli
+FROM alpine:3.15 as flux-cli
 
 # Create minimal nsswitch.conf file to prioritize the usage of /etc/hosts over DNS queries.
 # https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-354316460
diff --git a/cmd/flux/check_test.go b/cmd/flux/check_test.go
index 8ae39b1bfb4262e70944695d417c288a4d7e5878..e6374535b4cf698c68981bc4155b512034b4861a 100644
--- a/cmd/flux/check_test.go
+++ b/cmd/flux/check_test.go
@@ -1,3 +1,4 @@
+//go:build e2e
 // +build e2e
 
 /*
diff --git a/cmd/flux/create_source_git_test.go b/cmd/flux/create_source_git_test.go
index 943cbff360622a571a8eba432ec8e49d2ba862ee..1b391bce16ba9df26bbdd80dcefc90247d0506e9 100644
--- a/cmd/flux/create_source_git_test.go
+++ b/cmd/flux/create_source_git_test.go
@@ -1,3 +1,4 @@
+//go:build unit
 // +build unit
 
 /*
diff --git a/cmd/flux/export_test.go b/cmd/flux/export_test.go
index 74b9bf5d255eaf2eeb4618b10e373adc3a0e69b2..dc59caa237ecf5da67823f0ab35ef545962a175b 100644
--- a/cmd/flux/export_test.go
+++ b/cmd/flux/export_test.go
@@ -1,3 +1,4 @@
+//go:build unit
 // +build unit
 
 package main
diff --git a/cmd/flux/helmrelease_test.go b/cmd/flux/helmrelease_test.go
index 64f5c16411598845a38208c6bbf327cbc8a4da2d..dcb9ff588f425fe44671785d42be2cc90e816e2c 100644
--- a/cmd/flux/helmrelease_test.go
+++ b/cmd/flux/helmrelease_test.go
@@ -1,3 +1,4 @@
+//go:build e2e
 // +build e2e
 
 /*
diff --git a/cmd/flux/image_test.go b/cmd/flux/image_test.go
index 1ac0779f9bd6b7e4bad3c2fac9d6dec67e75e47a..a0e0b2574e89998ac86091e73b4aa7f5273e35e3 100644
--- a/cmd/flux/image_test.go
+++ b/cmd/flux/image_test.go
@@ -1,3 +1,4 @@
+//go:build e2e
 // +build e2e
 
 package main
diff --git a/cmd/flux/kustomization_test.go b/cmd/flux/kustomization_test.go
index e997e451f079c5cbd4787fd54e5e95d9ec58839e..f2a16fb0724e418c69571de8a701b61fc6944d3e 100644
--- a/cmd/flux/kustomization_test.go
+++ b/cmd/flux/kustomization_test.go
@@ -1,3 +1,4 @@
+//go:build e2e
 // +build e2e
 
 /*
diff --git a/cmd/flux/logs_test.go b/cmd/flux/logs_test.go
index 213e789f2d39e57a4355e02be6a82c2583766c8f..9355e37b25d82e62c3b21136e0b0a167b03ee0f8 100644
--- a/cmd/flux/logs_test.go
+++ b/cmd/flux/logs_test.go
@@ -1,3 +1,4 @@
+//go:build unit
 // +build unit
 
 /*
diff --git a/cmd/flux/main_e2e_test.go b/cmd/flux/main_e2e_test.go
index 7cd6bfa26105cf439fc2891f77d04323bfc4fce2..20a51c5fa89d5f65f4c126cc40c59d0a9525795a 100644
--- a/cmd/flux/main_e2e_test.go
+++ b/cmd/flux/main_e2e_test.go
@@ -1,3 +1,4 @@
+//go:build e2e
 // +build e2e
 
 /*
diff --git a/cmd/flux/main_unit_test.go b/cmd/flux/main_unit_test.go
index 605b204c902e26da7c30fce302794d25a7e4f8fe..8d3e639862e3dc675495c9f363a178baf9056f70 100644
--- a/cmd/flux/main_unit_test.go
+++ b/cmd/flux/main_unit_test.go
@@ -1,3 +1,4 @@
+//go:build unit
 // +build unit
 
 /*
diff --git a/cmd/flux/trace_test.go b/cmd/flux/trace_test.go
index 943c6bd7f2f6cc96aaaeda2d0e071fe3cd9c22b9..fc496de0f8ea82883b74114ca1ddc65145e3293d 100644
--- a/cmd/flux/trace_test.go
+++ b/cmd/flux/trace_test.go
@@ -1,3 +1,4 @@
+//go:build unit
 // +build unit
 
 package main
diff --git a/cmd/flux/tree_kustomization_test.go b/cmd/flux/tree_kustomization_test.go
index be5ce57e00795281c5165e33413ab5376fe93c80..045b869bfd1f693ec4423f186bb4ac213fa85fba 100644
--- a/cmd/flux/tree_kustomization_test.go
+++ b/cmd/flux/tree_kustomization_test.go
@@ -1,3 +1,4 @@
+//go:build unit
 // +build unit
 
 /*
diff --git a/cmd/flux/version_utils_test.go b/cmd/flux/version_utils_test.go
index 0aab01d99e3d9b94646c55e7577f95ceea53a8ff..fc9e8e76d1de2a0052daf5b66f001886ccc655cb 100644
--- a/cmd/flux/version_utils_test.go
+++ b/cmd/flux/version_utils_test.go
@@ -1,3 +1,4 @@
+//go:build unit
 // +build unit
 
 /*
diff --git a/go.mod b/go.mod
index 78ae30a23e446bc0b78c360587dd877915e093f0..c2e8093a8f4437fce53ad9a928e088c08876de05 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/fluxcd/flux2
 
-go 1.16
+go 1.17
 
 require (
 	github.com/Masterminds/semver/v3 v3.1.0
@@ -19,7 +19,6 @@ require (
 	github.com/fluxcd/pkg/untar v0.0.5
 	github.com/fluxcd/pkg/version v0.0.1
 	github.com/fluxcd/source-controller/api v0.20.1
-	github.com/go-errors/errors v1.4.0 // indirect
 	github.com/go-git/go-git/v5 v5.4.2
 	github.com/google/go-cmp v0.5.6
 	github.com/google/go-containerregistry v0.2.0
@@ -41,3 +40,97 @@ require (
 	sigs.k8s.io/kustomize/api v0.10.1
 	sigs.k8s.io/yaml v1.3.0
 )
+
+require (
+	cloud.google.com/go v0.81.0 // indirect
+	github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
+	github.com/Azure/go-autorest v14.2.0+incompatible // indirect
+	github.com/Azure/go-autorest/autorest v0.11.18 // indirect
+	github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
+	github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
+	github.com/Azure/go-autorest/logger v0.2.1 // indirect
+	github.com/Azure/go-autorest/tracing v0.6.0 // indirect
+	github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
+	github.com/Microsoft/go-winio v0.4.16 // indirect
+	github.com/PuerkitoBio/purell v1.1.1 // indirect
+	github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+	github.com/acomagu/bufpipe v1.0.3 // indirect
+	github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect
+	github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+	github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
+	github.com/davecgh/go-spew v1.1.1 // indirect
+	github.com/emirpasic/gods v1.12.0 // indirect
+	github.com/evanphx/json-patch v4.12.0+incompatible // indirect
+	github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
+	github.com/fluxcd/pkg/apis/acl v0.0.3 // indirect
+	github.com/fluxcd/pkg/apis/kustomize v0.3.1 // indirect
+	github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
+	github.com/fvbommel/sortorder v1.0.1 // indirect
+	github.com/go-errors/errors v1.4.0 // indirect
+	github.com/go-git/gcfg v1.5.0 // indirect
+	github.com/go-git/go-billy/v5 v5.3.1 // indirect
+	github.com/go-logr/logr v1.2.2 // indirect
+	github.com/go-openapi/jsonpointer v0.19.5 // indirect
+	github.com/go-openapi/jsonreference v0.19.5 // indirect
+	github.com/go-openapi/swag v0.19.14 // indirect
+	github.com/gogo/protobuf v1.3.2 // indirect
+	github.com/golang/protobuf v1.5.2 // indirect
+	github.com/google/btree v1.0.1 // indirect
+	github.com/google/go-github/v35 v35.3.0 // indirect
+	github.com/google/go-querystring v1.0.0 // indirect
+	github.com/google/gofuzz v1.2.0 // indirect
+	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
+	github.com/google/uuid v1.2.0 // indirect
+	github.com/googleapis/gnostic v0.5.5 // indirect
+	github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
+	github.com/hashicorp/errwrap v1.0.0 // indirect
+	github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
+	github.com/hashicorp/go-multierror v1.1.1 // indirect
+	github.com/hashicorp/go-retryablehttp v0.6.8 // indirect
+	github.com/imdario/mergo v0.3.12 // indirect
+	github.com/inconshreveable/mousetrap v1.0.0 // indirect
+	github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
+	github.com/josharian/intern v1.0.0 // indirect
+	github.com/json-iterator/go v1.1.12 // indirect
+	github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
+	github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
+	github.com/mailru/easyjson v0.7.6 // indirect
+	github.com/mattn/go-runewidth v0.0.7 // indirect
+	github.com/mitchellh/go-homedir v1.1.0 // indirect
+	github.com/mitchellh/go-wordwrap v1.0.0 // indirect
+	github.com/moby/spdystream v0.2.0 // indirect
+	github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
+	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+	github.com/modern-go/reflect2 v1.0.2 // indirect
+	github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
+	github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
+	github.com/pkg/errors v0.9.1 // indirect
+	github.com/pmezard/go-difflib v1.0.0 // indirect
+	github.com/russross/blackfriday v1.5.2 // indirect
+	github.com/russross/blackfriday/v2 v2.0.1 // indirect
+	github.com/sergi/go-diff v1.1.0 // indirect
+	github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
+	github.com/stretchr/testify v1.7.0 // indirect
+	github.com/xanzy/go-gitlab v0.51.1 // indirect
+	github.com/xanzy/ssh-agent v0.3.0 // indirect
+	github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
+	go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
+	golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
+	golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
+	golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
+	golang.org/x/text v0.3.7 // indirect
+	golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
+	google.golang.org/appengine v1.6.7 // indirect
+	google.golang.org/protobuf v1.27.1 // indirect
+	gopkg.in/inf.v0 v0.9.1 // indirect
+	gopkg.in/warnings.v0 v0.1.2 // indirect
+	gopkg.in/yaml.v2 v2.4.0 // indirect
+	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+	k8s.io/component-base v0.23.1 // indirect
+	k8s.io/klog/v2 v2.30.0 // indirect
+	k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
+	k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 // indirect
+	sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
+	sigs.k8s.io/kustomize/kyaml v0.13.0 // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
+)
diff --git a/internal/bootstrap/git/gogit/gogit_test.go b/internal/bootstrap/git/gogit/gogit_test.go
index b70cf8c362fef0635e6dcf1ff936647fd62fefde..416898d154f51b63d9571fdfc4566bd8d80f8600 100644
--- a/internal/bootstrap/git/gogit/gogit_test.go
+++ b/internal/bootstrap/git/gogit/gogit_test.go
@@ -1,3 +1,4 @@
+//go:build unit
 // +build unit
 
 package gogit
diff --git a/internal/flags/crds_test.go b/internal/flags/crds_test.go
index 9d20b095c8332f725521fa09ba8bc08218fb6800..e51362c16cde87c7bb0df89ab5ab46f86ca03548 100644
--- a/internal/flags/crds_test.go
+++ b/internal/flags/crds_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/decryption_provider_test.go b/internal/flags/decryption_provider_test.go
index 86a0deba2f3929a42923535542c56c6732b14964..2995a02d42b62d55ac83a42cb8f9daa955c4be59 100644
--- a/internal/flags/decryption_provider_test.go
+++ b/internal/flags/decryption_provider_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/ecdsa_curve_test.go b/internal/flags/ecdsa_curve_test.go
index e58c8b8b74ca3c17c756da9b254a311f8c7e031b..e42b98fd41848203046a2b2ea07eab65dee16cee 100644
--- a/internal/flags/ecdsa_curve_test.go
+++ b/internal/flags/ecdsa_curve_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/git_implementation_test.go b/internal/flags/git_implementation_test.go
index e555dd277dc90ed47cd0cdc43a6bc8a9640902f7..22048f2e073549aba359bff26a38d6379bff4975 100644
--- a/internal/flags/git_implementation_test.go
+++ b/internal/flags/git_implementation_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/helm_chart_source_test.go b/internal/flags/helm_chart_source_test.go
index 62b34ea6ae6cefaf91418c10e61c526e5eb165d1..726581ed82a672d8512927d82415cfa921eb9cef 100644
--- a/internal/flags/helm_chart_source_test.go
+++ b/internal/flags/helm_chart_source_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/helm_release_values_test.go b/internal/flags/helm_release_values_test.go
index 8e39204909943dfe242a9c1764048f1bd94ed14f..369f64bbc0b449aea32fcbc9c06f1714611f14ec 100644
--- a/internal/flags/helm_release_values_test.go
+++ b/internal/flags/helm_release_values_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/kustomization_source_test.go b/internal/flags/kustomization_source_test.go
index db5062d95f4700a8b9902b236e4ee1d58896e2e9..2d1ba7e0a21e46ab0447e15b1ade88e89d4f175b 100644
--- a/internal/flags/kustomization_source_test.go
+++ b/internal/flags/kustomization_source_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/log_level_test.go b/internal/flags/log_level_test.go
index a8ef1cae38d885ad6f951448afc6e5f3ca8a65f3..8bb2e541aaf8f280bd64f3a701dad92975363a2e 100644
--- a/internal/flags/log_level_test.go
+++ b/internal/flags/log_level_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/public_key_algorithm_test.go b/internal/flags/public_key_algorithm_test.go
index e2b6923052131658555d871c2865372b3f77d17b..69b4bf465b884089ca1e2ab0e28b987018230930 100644
--- a/internal/flags/public_key_algorithm_test.go
+++ b/internal/flags/public_key_algorithm_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/rsa_key_bits_test.go b/internal/flags/rsa_key_bits_test.go
index e0b15e7c8be8f5f7bcb52fc4f49c57dcafd9ca35..d4bd2965740a2730bbf7c98003605db0cc27b7e4 100644
--- a/internal/flags/rsa_key_bits_test.go
+++ b/internal/flags/rsa_key_bits_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/safe_relative_path_test.go b/internal/flags/safe_relative_path_test.go
index 8651436f80ecf407a7ae9758b689b47d135fdf47..325bd658980e90020ac11454f671b0a7f7392709 100644
--- a/internal/flags/safe_relative_path_test.go
+++ b/internal/flags/safe_relative_path_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/flags/source_bucket_provider_test.go b/internal/flags/source_bucket_provider_test.go
index 5ec82e3520974ad343c1188fc5e78b52ed358cf5..244a7ac6fa5b42bc4d0254364a42ef30b7263b48 100644
--- a/internal/flags/source_bucket_provider_test.go
+++ b/internal/flags/source_bucket_provider_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/internal/utils/utils_test.go b/internal/utils/utils_test.go
index 2e5d6542a078127c2655be7429add86e4dbaf2af..516423e6d6201c3f60b8a63a57fc1126b80087d9 100644
--- a/internal/utils/utils_test.go
+++ b/internal/utils/utils_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/pkg/manifestgen/sourcesecret/sourcesecret_test.go b/pkg/manifestgen/sourcesecret/sourcesecret_test.go
index b7e4e2c1af023563ad3615a02a829ccabd1d073a..e225bbd8ea687bf6d93e0f6df96a29ec268ce86f 100644
--- a/pkg/manifestgen/sourcesecret/sourcesecret_test.go
+++ b/pkg/manifestgen/sourcesecret/sourcesecret_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/pkg/manifestgen/sync/sync_test.go b/pkg/manifestgen/sync/sync_test.go
index 175cb13394cd39e6d1fe21b0c903706be26f804f..3ab0a743dd75f498a1f81d54388470ebef5f46cb 100644
--- a/pkg/manifestgen/sync/sync_test.go
+++ b/pkg/manifestgen/sync/sync_test.go
@@ -1,3 +1,4 @@
+//go:build !e2e
 // +build !e2e
 
 /*
diff --git a/tests/azure/go.mod b/tests/azure/go.mod
index 6be7ae83d39143dda6754612fc528e126818c179..fcbdc583607aff2bec5425b451370bb51a994510 100644
--- a/tests/azure/go.mod
+++ b/tests/azure/go.mod
@@ -1,6 +1,6 @@
 module github.com/fluxcd/flux2/tests/azure
 
-go 1.16
+go 1.17
 
 require (
 	github.com/Azure/azure-event-hubs-go/v3 v3.3.13
@@ -23,3 +23,86 @@ require (
 	k8s.io/client-go v0.23.1
 	sigs.k8s.io/controller-runtime v0.11.0
 )
+
+require (
+	cloud.google.com/go v0.54.0 // indirect
+	cloud.google.com/go/storage v1.6.0 // indirect
+	github.com/Azure/azure-amqp-common-go/v3 v3.0.1 // indirect
+	github.com/Azure/azure-sdk-for-go v51.1.0+incompatible // indirect
+	github.com/Azure/go-amqp v0.13.12 // indirect
+	github.com/Azure/go-autorest v14.2.0+incompatible // indirect
+	github.com/Azure/go-autorest/autorest v0.11.18 // indirect
+	github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
+	github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
+	github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
+	github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
+	github.com/Azure/go-autorest/logger v0.2.1 // indirect
+	github.com/Azure/go-autorest/tracing v0.6.0 // indirect
+	github.com/BurntSushi/toml v0.3.1 // indirect
+	github.com/aws/aws-sdk-go v1.15.78 // indirect
+	github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
+	github.com/davecgh/go-spew v1.1.1 // indirect
+	github.com/devigned/tab v0.1.1 // indirect
+	github.com/evanphx/json-patch v4.11.0+incompatible // indirect
+	github.com/fluxcd/pkg/apis/kustomize v0.2.0 // indirect
+	github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
+	github.com/go-logr/logr v0.4.0 // indirect
+	github.com/gogo/protobuf v1.3.2 // indirect
+	github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
+	github.com/golang/protobuf v1.5.2 // indirect
+	github.com/google/go-cmp v0.5.6 // indirect
+	github.com/google/gofuzz v1.1.0 // indirect
+	github.com/google/uuid v1.1.2 // indirect
+	github.com/googleapis/gax-go/v2 v2.0.5 // indirect
+	github.com/googleapis/gnostic v0.5.5 // 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-retryablehttp v0.6.8 // indirect
+	github.com/hashicorp/go-safetemp v1.0.0 // indirect
+	github.com/hashicorp/go-uuid v1.0.1 // indirect
+	github.com/hashicorp/go-version v1.3.0 // indirect
+	github.com/hashicorp/terraform-json v0.12.0 // indirect
+	github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 // indirect
+	github.com/jpillora/backoff v1.0.0 // indirect
+	github.com/json-iterator/go v1.1.11 // indirect
+	github.com/jstemmer/go-junit-report v0.9.1 // indirect
+	github.com/klauspost/compress v1.11.2 // indirect
+	github.com/mitchellh/go-homedir v1.1.0 // indirect
+	github.com/mitchellh/go-testing-interface v1.0.0 // indirect
+	github.com/mitchellh/mapstructure v1.1.2 // indirect
+	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+	github.com/modern-go/reflect2 v1.0.1 // indirect
+	github.com/pkg/errors v0.9.1 // indirect
+	github.com/pmezard/go-difflib v1.0.0 // indirect
+	github.com/ulikunitz/xz v0.5.8 // indirect
+	github.com/zclconf/go-cty v1.8.4 // indirect
+	go.opencensus.io v0.23.0 // indirect
+	go.uber.org/atomic v1.7.0 // indirect
+	golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
+	golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
+	golang.org/x/mod v0.4.2 // indirect
+	golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect
+	golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
+	golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect
+	golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+	golang.org/x/text v0.3.6 // indirect
+	golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
+	golang.org/x/tools v0.1.2 // indirect
+	golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
+	google.golang.org/api v0.20.0 // indirect
+	google.golang.org/appengine v1.6.7 // indirect
+	google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
+	google.golang.org/grpc v1.38.0 // indirect
+	google.golang.org/protobuf v1.26.0 // indirect
+	gopkg.in/inf.v0 v0.9.1 // indirect
+	gopkg.in/yaml.v2 v2.4.0 // indirect
+	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+	honnef.co/go/tools v0.0.1-2020.1.3 // indirect
+	k8s.io/apiextensions-apiserver v0.22.2 // indirect
+	k8s.io/klog/v2 v2.9.0 // indirect
+	k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect
+	k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
+	sigs.k8s.io/yaml v1.2.0 // indirect
+)