kdevops.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Daniel Gomez <da.gomez@samsung.com>
To: "mcgrof@kernel.org" <mcgrof@kernel.org>
Cc: "kdevops@lists.linux.dev" <kdevops@lists.linux.dev>,
	"jlayton@kernel.org" <jlayton@kernel.org>,
	Daniel Gomez <da.gomez@samsung.com>
Subject: [PATCH 1/5] terraform: gce: remove redundant string for cpu and mem choice
Date: Tue, 12 Sep 2023 19:49:13 +0000	[thread overview]
Message-ID: <20230912194908.939107-2-da.gomez@samsung.com> (raw)
In-Reply-To: <20230912194908.939107-1-da.gomez@samsung.com>

This commits is part of the propagation fix found by Jeff
Layton in the choice/endchoice Kconfig option. When a CONFIG option
is used to assign the selected CONFIG, a string can't be added to
that config, otherwise the config is exposed and not updated with
user selection. Removing the string makes the config option hide from
the menuconfig.

For multichoice menu with single choice, remove choice menu and
leave it as standalone option with its default value.

Also, s/gce/GCE/g for Google Compute Engine (GCE) or Google Cloud
Platform Provider (GCP) and add documentation link to the terraform
variable each option is assigned to.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 terraform/gce/Kconfig | 56 ++++++++++++-------------------------------
 1 file changed, 15 insertions(+), 41 deletions(-)

diff --git a/terraform/gce/Kconfig b/terraform/gce/Kconfig
index 2102abd2..95ebd8da 100644
--- a/terraform/gce/Kconfig
+++ b/terraform/gce/Kconfig
@@ -8,24 +8,15 @@ config TERRAFORM_GCE_PROJECT_NAME
 	  the actual name of the project you have created using the
 	  GCE interface.
 
-choice
-	prompt "Choose GCE region location to use"
-	default TERRAFORM_GCE_WEST_2C
-
-config TERRAFORM_GCE_WEST_2C
-	bool "us-west2-c"
-	help
-	  This option will set the gce region location to us-west2-c.
-
-endchoice
-
 config TERRAFORM_GCE_REGION_LOCATION
 	string "GCE region location"
-	default "us-west2-c" if TERRAFORM_GCE_WEST_2C
+	default "us-west2-c"
 	help
-	  This option will set the gce region location. For more examples:
+	  This option will set the GCE region location. For more examples:
 	  https://cloud.google.com/compute/docs/regions-zones/
 
+	  Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#zone
+
 choice
 	prompt "Choose GCE Machine type"
 	default TERRAFORM_GCE_MACHINE_N1_STANDARD_8
@@ -45,7 +36,7 @@ config TERRAFORM_GCE_MACHINE_N1_STANDARD_8
 endchoice
 
 config TERRAFORM_GCE_MACHINE_TYPE
-	string "GCE Machine type"
+	string
 	default "n1-standard-1" if TERRAFORM_GCE_MACHINE_N1_STANDARD_1
 	default "n1-standard-8" if TERRAFORM_GCE_MACHINE_N1_STANDARD_8
 	help
@@ -54,40 +45,23 @@ config TERRAFORM_GCE_MACHINE_TYPE
 
 	  https://cloud.google.com/compute/docs/machine-types
 
-choice
-	prompt "Choose GCE scratch disk interface to use"
-	default TERRAFORM_GCE_SCRATCH_DISK_NVME
-
-config TERRAFORM_GCE_SCRATCH_DISK_NVME
-	bool "NVME"
-	help
-	  This option sets the scratch disk interface to NVMe.
-
-endchoice
+	  Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#machine_type
 
 config TERRAFORM_GCE_SCRATCH_DISK_INTERFACE
-	string "GCE scratch disk interface"
-	default "NVME" if TERRAFORM_GCE_SCRATCH_DISK_NVME
+	string "GCE scratch disk interface to use"
+	default "NVME"
 	help
-	  This option will set gce scratch disk interface.
+	  This option will set GCE scratch disk interface.
 
-choice
-	prompt "Choose GCE image to use"
-	default TERRAFORM_GCE_IMAGE_DEBIAN_10
-
-config TERRAFORM_GCE_IMAGE_DEBIAN_10
-	bool "debian-cloud/debian-10"
-	depends on TARGET_ARCH_X86_64
-	help
-	  This option sets the gce image to debian-cloud/debian-10.
-
-endchoice
+	  Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#scratch_disk
 
 config TERRAFORM_GCE_IMAGE
-	string "GCE image name to use"
-	default "debian-cloud/debian-10" if TERRAFORM_GCE_IMAGE_DEBIAN_10
+	string "GCE image to use"
+	default "debian-cloud/debian-10"
 	help
-	  This option will set gce image to debian-cloud/debian-10.
+	  This option will set GCE image to debian-cloud/debian-10.
+
+	  Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#image
 
 config TERRAFORM_GCE_JSON_CREDENTIALS_PATH
 	string "GCE json credential file path"
-- 
2.39.2

  parent reply	other threads:[~2023-09-12 19:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230912194912eucas1p20d99edc0e417cda49b132eb8b7777198@eucas1p2.samsung.com>
2023-09-12 19:49 ` [PATCH 0/5] Fix choice/endchoice kconfig options Daniel Gomez
     [not found]   ` <CGME20230912194914eucas1p2e6fc3cdcb7745a011c0760849f08eca8@eucas1p2.samsung.com>
2023-09-12 19:49     ` Daniel Gomez [this message]
     [not found]   ` <CGME20230912194916eucas1p18db4cbc48e72969e5ab4bdb7a0bb1ae9@eucas1p1.samsung.com>
2023-09-12 19:49     ` [PATCH 2/5] terraform: aws: hide AWS availability region option Daniel Gomez
     [not found]   ` <CGME20230912194917eucas1p255a2d6e940671576c95355d4ab9e99d4@eucas1p2.samsung.com>
2023-09-12 19:49     ` [PATCH 3/5] terraform: aws: hide TERRAFORM_AWS_AMI_OWNER and drop AWS name search Daniel Gomez
     [not found]   ` <CGME20230912194919eucas1p1acf335160e5a2750745c5fba9084b080@eucas1p1.samsung.com>
2023-09-12 19:49     ` [PATCH 4/5] terraform: aws: drop multichoice option for TERRAFORM_AWS_VIRT_TYPE Daniel Gomez
     [not found]   ` <CGME20230912194920eucas1p188665453a470e3ef71f957c1b063ba4a@eucas1p1.samsung.com>
2023-09-12 19:49     ` [PATCH 5/5] terraform: aws: hide TERRAFORM_AWS_INSTANCE_TYPE Daniel Gomez
2023-09-12 21:49   ` [PATCH 0/5] Fix choice/endchoice kconfig options Luis Chamberlain
2023-09-13  4:56     ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230912194908.939107-2-da.gomez@samsung.com \
    --to=da.gomez@samsung.com \
    --cc=jlayton@kernel.org \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).