feat(id.tjo.space): changes
This commit is contained in:
parent
0864eedc9e
commit
7e2485bdbf
4 changed files with 47 additions and 47 deletions
|
@ -2,7 +2,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
echo "== Fetch Source Code (from git)"
|
||||
cd "$HOME/service"
|
||||
cd "/root/service"
|
||||
# Clone if not yet cloned
|
||||
if [ ! -d .git ]; then
|
||||
git clone \
|
||||
|
|
|
@ -1,52 +1,6 @@
|
|||
default:
|
||||
@just --list
|
||||
|
||||
dot-env-encrypt:
|
||||
sops \
|
||||
--encrypt \
|
||||
--input-type=dotenv \
|
||||
--output-type=dotenv \
|
||||
.env > .env.encrypted
|
||||
|
||||
dot-env-decrypt:
|
||||
sops \
|
||||
--decrypt \
|
||||
--input-type=dotenv \
|
||||
--output-type=dotenv \
|
||||
.env.encrypted > .env
|
||||
|
||||
tofu-state-encrypt:
|
||||
#!/bin/bash
|
||||
for file in $(find -name tofu.tfstate -o -name terraform.tfstate)
|
||||
do
|
||||
echo "Encrypting $file"
|
||||
sops \
|
||||
--encrypt \
|
||||
--input-type=json \
|
||||
--output-type=json \
|
||||
$file > ${file}.encrypted
|
||||
done
|
||||
|
||||
tofu-state-decrypt:
|
||||
#!/bin/bash
|
||||
for file in $(find -name tofu.tfstate.encrypted -o -name terraform.tfstate.encrypted)
|
||||
do
|
||||
echo "Decrypting $file"
|
||||
sops \
|
||||
--decrypt \
|
||||
--input-type=json \
|
||||
--output-type=json \
|
||||
$file > ${file%.encrypted}
|
||||
done
|
||||
|
||||
lint:
|
||||
@tofu fmt -check -recursive .
|
||||
@tflint --recursive
|
||||
|
||||
format:
|
||||
@tofu fmt -recursive .
|
||||
@tflint --recursive
|
||||
|
||||
apply:
|
||||
#!/usr/bin/env sh
|
||||
cd {{source_directory()}}/terraform
|
||||
|
|
46
justfile
46
justfile
|
@ -7,3 +7,49 @@ mod id 'id.tjo.space'
|
|||
|
||||
default:
|
||||
@just --list
|
||||
|
||||
lint:
|
||||
@tofu fmt -check -recursive .
|
||||
@tflint --recursive
|
||||
|
||||
format:
|
||||
@tofu fmt -recursive .
|
||||
@tflint --recursive
|
||||
|
||||
dot-env-encrypt:
|
||||
sops \
|
||||
--encrypt \
|
||||
--input-type=dotenv \
|
||||
--output-type=dotenv \
|
||||
.env > .env.encrypted
|
||||
|
||||
dot-env-decrypt:
|
||||
sops \
|
||||
--decrypt \
|
||||
--input-type=dotenv \
|
||||
--output-type=dotenv \
|
||||
.env.encrypted > .env
|
||||
|
||||
tofu-state-encrypt:
|
||||
#!/bin/bash
|
||||
for file in $(find -name tofu.tfstate -o -name terraform.tfstate)
|
||||
do
|
||||
echo "Encrypting $file"
|
||||
sops \
|
||||
--encrypt \
|
||||
--input-type=json \
|
||||
--output-type=json \
|
||||
$file > ${file}.encrypted
|
||||
done
|
||||
|
||||
tofu-state-decrypt:
|
||||
#!/bin/bash
|
||||
for file in $(find -name tofu.tfstate.encrypted -o -name terraform.tfstate.encrypted)
|
||||
do
|
||||
echo "Decrypting $file"
|
||||
sops \
|
||||
--decrypt \
|
||||
--input-type=json \
|
||||
--output-type=json \
|
||||
$file > ${file%.encrypted}
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue