about summary refs log tree commit diff
path: root/ops/terraform
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-06-10T11·41+0300
committerflokli <flokli@flokli.de>2024-06-10T12·04+0000
commit33e15aa950093c8930bbf509840350068dbedfd0 (patch)
tree63a0f7af6976b3bae629ebb0ebe6e85a48b8c588 /ops/terraform
parentd3bc358bbc41b8913eb3ffebe93d33cfe5fc11b1 (diff)
docs(ops/terraform/deploy-nixos): document variables in README r/8240
Give some more context about what these mean. Mostly copied from the
descriptions in nix-eval.sh

Change-Id: I845f4227206f7035bcd185a708c14877a040c46a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11778
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'ops/terraform')
-rw-r--r--ops/terraform/deploy-nixos/README.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/ops/terraform/deploy-nixos/README.md b/ops/terraform/deploy-nixos/README.md
index fd0bd1b4423a..2580a7c0e102 100644
--- a/ops/terraform/deploy-nixos/README.md
+++ b/ops/terraform/deploy-nixos/README.md
@@ -25,8 +25,17 @@ deploy is necessary.
 
 ```terraform
 module "deploy_somehost" {
+  # Clone just this directory through josh. Add a `ref=` parameter to pin to a specific commit.
   source              = "git::https://code.tvl.fyi/depot.git:/ops/terraform/deploy-nixos.git"
+
+  # The attribute.path pointing to the expression to instantiate.
   attrpath            = "ops.nixos.somehost"
+
+  # The path to the Nix file to invoke. Optional.
+  # If omitted, will shell out to git to determine the repo root, and Nix will
+  # use `default.nix` in there.
+  entrypoint          = "${path.module}/../../somewhere.nix"
+
   target_host         = "somehost.tvl.su"
   target_user         = "someone"
   target_user_ssh_key = tls_private_key.somehost.private_key_pem
@@ -37,9 +46,6 @@ module "deploy_somehost" {
 
 Several things can be improved about this module, for example:
 
-* The repository root (relative to which the attribute path is evaluated) could
-  be made configurable.
-
 * The remote system closure could be discovered to restore remote system state
   after manual deploys on the target (i.e. "stomping" of changes).