fix: zitadel script
This commit is contained in:
parent
5396c9bab6
commit
7a7e8bb088
1 changed files with 8 additions and 4 deletions
|
|
@ -555,7 +555,11 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "zitadel.service" ];
|
wants = [ "zitadel.service" ];
|
||||||
|
|
||||||
script = ''
|
script =
|
||||||
|
let
|
||||||
|
tofu = lib.getExe pkgs.opentofu;
|
||||||
|
in
|
||||||
|
''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ "$(systemctl is-active zitadel)" != "active" ]; then
|
if [ "$(systemctl is-active zitadel)" != "active" ]; then
|
||||||
|
|
@ -570,11 +574,11 @@ in
|
||||||
cp -f ${terraformConfiguration} config.tf.json
|
cp -f ${terraformConfiguration} config.tf.json
|
||||||
|
|
||||||
# Initialize OpenTofu
|
# Initialize OpenTofu
|
||||||
${lib.getExe pkgs.opentofu} init
|
${tofu} init
|
||||||
|
|
||||||
# Run the infrastructure code
|
# Run the infrastructure code
|
||||||
# ${lib.getExe pkgs.opentofu} plan
|
${tofu} plan -refresh=false -out=tfplan
|
||||||
${lib.getExe pkgs.opentofu} apply -auto-approve
|
${tofu} apply -auto-approve tfplan
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue