diff options
-rw-r--r-- | corp/ops/.envrc | 4 | ||||
-rw-r--r-- | corp/ops/.gitignore | 2 | ||||
-rw-r--r-- | corp/ops/default.nix | 21 | ||||
-rw-r--r-- | corp/ops/main.tf | 10 |
4 files changed, 37 insertions, 0 deletions
diff --git a/corp/ops/.envrc b/corp/ops/.envrc new file mode 100644 index 000000000000..26049cf426a4 --- /dev/null +++ b/corp/ops/.envrc @@ -0,0 +1,4 @@ +out=$(nix-build ../.. -A corp.ops.deps --out-link ../../.gcroots/corp-deps) +PATH_add "$out/bin" + +watch_file default.nix diff --git a/corp/ops/.gitignore b/corp/ops/.gitignore new file mode 100644 index 000000000000..c035e729186f --- /dev/null +++ b/corp/ops/.gitignore @@ -0,0 +1,2 @@ +.terraform +.terraform.lock.hcl diff --git a/corp/ops/default.nix b/corp/ops/default.nix new file mode 100644 index 000000000000..59a998cca032 --- /dev/null +++ b/corp/ops/default.nix @@ -0,0 +1,21 @@ +{ depot, lib, pkgs, ... }: + +depot.nix.readTree.drvTargets rec { + # Provide a Terraform wrapper with Yandex Cloud support. + terraform = pkgs.terraform.withPlugins (p: [ + p.yandex + ]); + + validate = depot.tools.checks.validateTerraform { + inherit terraform; + name = "corp"; + src = lib.cleanSource ./.; + }; + + deps = depot.tools.depot-deps.overrideDeps { + tf-yandex = { + attr = "corp.ops.terraform"; + cmd = "terraform"; + }; + }; +} diff --git a/corp/ops/main.tf b/corp/ops/main.tf new file mode 100644 index 000000000000..98cea4c63175 --- /dev/null +++ b/corp/ops/main.tf @@ -0,0 +1,10 @@ +# Terraform configuration for TVL corp infrastructure (on Yandex +# Cloud). + +terraform { + required_providers { + yandex = { + source = "yandex-cloud/yandex" + } + } +} |