From 47f17af223999e15420ae42cfa20a9bb7acc90c4 Mon Sep 17 00:00:00 2001
From: Timo Furrer <tfurrer@gitlab.com>
Date: Tue, 16 Jan 2024 17:21:36 +0100
Subject: [PATCH] Document inputs options

---
 Makefile  | 2 +-
 README.md | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index bda2444..2174b57 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 docs:
 	csplit -sf readme -n 1 .gitlab/README.md '/<INPUTS>/'
-	yq '.spec.inputs | .[] | "| `" + key + "` | `" + .default + "` | " + .description + " |"' templates/full-pipeline.yml > readme_inputs.md
+	yq '.spec.inputs | .[] | "| `" + key + "` | `" + .default + "` | " + .description + (.options | (" Must be one of " + (. | map("`" + . + "`")| join(", ") + "." )) // "") + " |"' templates/full-pipeline.yml > readme_inputs.md
 	echo '<!-- This document is generated by `make docs` from `.gitlab/README.md` -->' > README.md
 	echo >> README.md
 	cat readme0 >> README.md
diff --git a/README.md b/README.md
index 73db48b..a5d5d06 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ stages: [validate, test, build, deploy, cleanup]
 | `stage_deploy` | `deploy` | Defines the deploy stage. This stage includes the `apply` job. |
 | `stage_cleanup` | `cleanup` | Defines the cleanup stage. This stage includes the `destroy` and `delete-state` jobs. |
 | `version` | `latest` | Version of this component. Has to be the same as the one in the component include entry. |
-| `opentofu_version` | `1.6.0` | OpenTofu version that should be used. |
+| `opentofu_version` | `1.6.0` | OpenTofu version that should be used. Must be one of `1.6.0`, `1.6.0-rc1`. |
 | `gitlab_opentofu_image` | `$CI_REGISTRY/components/opentofu/gitlab-opentofu:$[[ inputs.version ]]-opentofu$[[ inputs.opentofu_version ]]` | Tag of the gitlab-opentofu image. |
 | `root_dir` | `${CI_PROJECT_DIR}` | Root directory for the OpenTofu project. |
 | `state_name` | `default` | Remote OpenTofu state name. |
-- 
GitLab