diff options
author | Franck Cuny <franck@fcuny.net> | 2022-10-04 17:50:11 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-10-04 17:50:11 -0700 |
commit | 255538c32e10e5dac29cac39a28ce499227f067f (patch) | |
tree | 2ece731263ebe6fc40e37a32f8ad5af969d3aed2 /ops/gcp-backups | |
parent | ref(tools/ssh-key-to-forge): replaced by gh-ssh-keys (diff) | |
download | world-255538c32e10e5dac29cac39a28ce499227f067f.tar.gz |
ops(terraform): individual actions for init/plan/apply
Don't do all of these actions together, instead provide helpers for both init, plan, and apply.
Diffstat (limited to 'ops/gcp-backups')
-rw-r--r-- | ops/gcp-backups/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ops/gcp-backups/default.nix b/ops/gcp-backups/default.nix index 44252e2..0e9ed07 100644 --- a/ops/gcp-backups/default.nix +++ b/ops/gcp-backups/default.nix @@ -8,13 +8,21 @@ pkgs.stdenv.mkDerivation rec { name = "tf-gcp-backups"; src = ./.; - setup = pkgs.writeShellScriptBin "tf-gcp-backups-setup" '' + init = pkgs.writeShellScriptBin "tf-gcp-backups-init" '' set -ueo pipefail - cd $(git rev-parse --show-toplevel)/ops/gcp-backups - ${terraform}/bin/terraform init + ''; + + plan = pkgs.writeShellScriptBin "tf-gcp-backups-plan" '' + set -ueo pipefail + cd $(git rev-parse --show-toplevel)/ops/gcp-backups ${terraform}/bin/terraform plan + ''; + + apply = pkgs.writeShellScriptBin "tf-gcp-backups-apply" '' + set -ueo pipefail + cd $(git rev-parse --show-toplevel)/ops/gcp-backups ${terraform}/bin/terraform apply ''; } |