From 22684f49e7c8456e8bcd0ae955999a8a7b0038a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Niesiob=C4=99dzki?= Date: Fri, 28 Jun 2024 14:42:20 +0000 Subject: [PATCH] Fix tutorial error. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without versions override it fails with: Error: Failed to query available provider packages │ │ Could not retrieve the list of available versions for provider hashicorp/kubectl: provider registry registry.terraform.io does not have a provider named registry.terraform.io/hashicorp/kubectl │ │ All modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which modules are currently depending on hashicorp/kubectl, run the following command: │ terraform providers --- blueprints/gke/patterns/batch/tutorial.md | 2 +- .../gke/patterns/batch/versions_override.tf | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 blueprints/gke/patterns/batch/versions_override.tf diff --git a/blueprints/gke/patterns/batch/tutorial.md b/blueprints/gke/patterns/batch/tutorial.md index 93a5586dcd..5f45ae02ef 100644 --- a/blueprints/gke/patterns/batch/tutorial.md +++ b/blueprints/gke/patterns/batch/tutorial.md @@ -92,7 +92,7 @@ cluster_name = "gke-patterns-cluster" cluster_create = { deletion_protection = false labels = { - pattern = "kafka" + pattern = "batch" } } region = "europe-west1" diff --git a/blueprints/gke/patterns/batch/versions_override.tf b/blueprints/gke/patterns/batch/versions_override.tf new file mode 100644 index 0000000000..67a5f0d290 --- /dev/null +++ b/blueprints/gke/patterns/batch/versions_override.tf @@ -0,0 +1,22 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +terraform { + required_providers { + kubectl = { + source = "gavinbunney/kubectl" + version = ">= 1.7.0" + } + } +}