feat(ops/terraform): allow specifying an entrypoint for the attrset
This adds an additional parameter `entrypoint`, pointing to a .nix file (or a directory containing a `default.nix` file) that's providing the attribute path asked for. If not set / kept at the default (empty string), it falls back to the root dir of the repository as before. Change-Id: I2e63114f21660c842153ac15424b3491d66624d2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8190 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
parent
344c119370
commit
c3750079f7
2 changed files with 15 additions and 5 deletions
|
|
@ -24,6 +24,16 @@ variable "target_host" {
|
|||
type = string
|
||||
}
|
||||
|
||||
variable "entrypoint" {
|
||||
description = <<EOT
|
||||
Path to a .nix file (or directory containing `default.nix` file)
|
||||
that provides the attrset specified in `closure`.
|
||||
If unset, asks git for the root of the repository.
|
||||
EOT
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "target_user" {
|
||||
description = "username on the target machine"
|
||||
type = string
|
||||
|
|
@ -40,7 +50,8 @@ data "external" "nixos_system" {
|
|||
program = ["${path.module}/nixos-eval.sh"]
|
||||
|
||||
query = {
|
||||
attrpath = var.attrpath
|
||||
attrpath = var.attrpath
|
||||
entrypoint = var.entrypoint
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue