From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAFA3247289 for ; Tue, 2 Sep 2025 13:54:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756821271; cv=none; b=YU08H99EsgNDA5nYu7vUFDgnWtdDzMLsA52oKF3tKVkr/nH9vkpm6YRRi+9ipMHemsej/Azo9AvPgP1YjRrMMJ4fpt5rooKqiZlThJorhJ+dMflfIpt9A8wENaXNN+Vhj+dXjlysbMkwZ2h55kkIYWcyKYQ4XJ3/DRyuNiCW+O0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756821271; c=relaxed/simple; bh=xoOBKHf7t6rk0/N4YJZcIp/TfC9mUrf36/q94VcwUuI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XoXxmlj7opGRKFQoUDXK3GExFEbBlnbcPbFfWoMIhsRuKPHdFpTppTc3lkzBpIn+xK/RCitoGCuLT8L5C+ILTp2RSlKKN4NP11q1YGtKJUV4DZsFebbA1IVl4EMLrYLNRKcOmzlIiH5Z3vdDcsx8CFjpo9TWGxumz+2RVQ++v7o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K5SJlsEC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K5SJlsEC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49C0DC4CEF5; Tue, 2 Sep 2025 13:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756821271; bh=xoOBKHf7t6rk0/N4YJZcIp/TfC9mUrf36/q94VcwUuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K5SJlsECppH6899i38TWTUs3SqR9YruI5ZnGJgyJSopTI97IBF2JgFaf9BqrvyMYB WfU1EhXl9PyxU3SiiFBAcX+GGacZTmYr8CBPqDW1T3+A57C0OohK/h/+OQr4GSiQXV oR0lMkDGDxm1PEIdNlm8IBXi6NTN2fveDZX2vn8Wi0lmHlEnzRwzGMp8qn5HlSF2lq I+IQnkEt4ttClDXRXVVXjQDugAkNZmWdvmWKGD3SavBE4BZKMb4Eja8MfI6kel76zE T1bdZhIbGtokFhDdovAKv+FoODGScAs4+ElEo9bPV6z5oySYYyPTMEx3pMXREwSgSH uWiUaNUEAzd1Q== From: Chuck Lever To: Cc: Chuck Lever , Luis Chamberlain Subject: [PATCH v2 05/37] terraform/azure: Make the resource group name a variable Date: Tue, 2 Sep 2025 09:53:52 -0400 Message-ID: <20250902135426.815079-6-cel@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250902135426.815079-1-cel@kernel.org> References: <20250902135426.815079-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever Resource groups appear to be global. To run more than one instance of kdevops in Azure at the same time, each instance needs a unique resource group. Hoist the resource group name into Kconfig so that it can be set to a unique value. Reviewed-by: Luis Chamberlain Signed-off-by: Chuck Lever --- .../templates/azure/terraform.tfvars.j2 | 1 + terraform/azure/kconfigs/Kconfig.location | 16 ++++++++++++++++ terraform/azure/main.tf | 2 +- terraform/azure/vars.tf | 5 +++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/gen_tfvars/templates/azure/terraform.tfvars.j2 b/playbooks/roles/gen_tfvars/templates/azure/terraform.tfvars.j2 index 8be48e800036..7ce0f6170e22 100644 --- a/playbooks/roles/gen_tfvars/templates/azure/terraform.tfvars.j2 +++ b/playbooks/roles/gen_tfvars/templates/azure/terraform.tfvars.j2 @@ -1,4 +1,5 @@ azure_subscription_id = "{{ terraform_azure_subscription_id }}" +azure_resource_group_name = "{{ terraform_azure_resource_group_name }}" azure_location = "{{ terraform_azure_location }}" azure_vmsize = "{{ terraform_azure_vm_size }}" azure_image_publisher = "{{ terraform_azure_image_publisher }}" diff --git a/terraform/azure/kconfigs/Kconfig.location b/terraform/azure/kconfigs/Kconfig.location index a7e8bae37507..2cc0e419d54d 100644 --- a/terraform/azure/kconfigs/Kconfig.location +++ b/terraform/azure/kconfigs/Kconfig.location @@ -134,3 +134,19 @@ config TERRAFORM_AZURE_LOCATION default "westus2" if TERRAFORM_AZURE_REGION_WESTUS2 default "westus3" if TERRAFORM_AZURE_REGION_WESTUS3 default "westcentralus" if TERRAFORM_AZURE_REGION_WESTCENTRALUS + +config TERRAFORM_AZURE_RESOURCE_GROUP_NAME + string "Azure resource group name" + output yaml + default "kdevops_resource_group" + help + An Azure resource group is a container that holds related + resources so they can be managed as a single unit. These + resources share the same life cycle and are deployed, + updated, and deleted together. Resource groups are global + to your subscription. + + To run concurrent kdevops jobs in Azure, each run must + have a unique resouce group name. + + https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/overview#resource-groups diff --git a/terraform/azure/main.tf b/terraform/azure/main.tf index c178c34d0180..8dcead78b5fd 100644 --- a/terraform/azure/main.tf +++ b/terraform/azure/main.tf @@ -1,7 +1,7 @@ # Azure terraform provider main resource "azurerm_resource_group" "kdevops_group" { - name = "kdevops_resource_group" + name = var.azure_resource_group_name location = var.azure_location } diff --git a/terraform/azure/vars.tf b/terraform/azure/vars.tf index 2d06857905e2..dd3c20ed05c7 100644 --- a/terraform/azure/vars.tf +++ b/terraform/azure/vars.tf @@ -33,6 +33,11 @@ variable "azure_managed_disks_tier" { type = string } +variable "azure_resource_group_name" { + description = "Name of the set of resources for this run" + type = string +} + variable "azure_subscription_id" { description = "Your Azure subscription ID" type = string -- 2.51.0