about summary refs log tree commit diff
path: root/ops/gcp-backups/default.nix
blob: 44252e2da73b85430e78f3c5aeab8bbede88fbab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ pkgs }:
let
  terraform = pkgs.terraform.withPlugins (p: [
    p.google
  ]);
in
pkgs.stdenv.mkDerivation rec {
  name = "tf-gcp-backups";
  src = ./.;

  setup = pkgs.writeShellScriptBin "tf-gcp-backups-setup" ''
    set -ueo pipefail

    cd $(git rev-parse --show-toplevel)/ops/gcp-backups

    ${terraform}/bin/terraform init
    ${terraform}/bin/terraform plan
    ${terraform}/bin/terraform apply
  '';
}