feat(corp/ops): bootstrap separate corp terraform config
Doesn't actually contain any configuration yet, just setting up TF with the right providers and so on. Change-Id: Ia7128dd977b4ff69eebaa36c6cad6ac104cafcdb Reviewed-on: https://cl.tvl.fyi/c/depot/+/8492 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
159646787a
commit
55c9f4a803
4 changed files with 37 additions and 0 deletions
4
corp/ops/.envrc
Normal file
4
corp/ops/.envrc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
out=$(nix-build ../.. -A corp.ops.deps --out-link ../../.gcroots/corp-deps)
|
||||||
|
PATH_add "$out/bin"
|
||||||
|
|
||||||
|
watch_file default.nix
|
2
corp/ops/.gitignore
vendored
Normal file
2
corp/ops/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.terraform
|
||||||
|
.terraform.lock.hcl
|
21
corp/ops/default.nix
Normal file
21
corp/ops/default.nix
Normal file
|
@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
10
corp/ops/main.tf
Normal file
10
corp/ops/main.tf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Terraform configuration for TVL corp infrastructure (on Yandex
|
||||||
|
# Cloud).
|
||||||
|
|
||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
yandex = {
|
||||||
|
source = "yandex-cloud/yandex"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue