mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Migrate to Hetzner cloud
This commit is contained in:
parent
d3c99dad0b
commit
c311cd4f7e
37 changed files with 416 additions and 299 deletions
12
terraform.sh
12
terraform.sh
|
|
@ -1,10 +1,12 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p terraform jq
|
||||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
export AWS_ACCESS_KEY_ID=`cat ~/.ssh/scw_key_id`
|
||||
export AWS_SECRET_ACCESS_KEY=`jq '.token' -r ~/.scwrc`
|
||||
export HCLOUD_TOKEN=$(./get_hcloud_token.sh)
|
||||
ENVIRONMENT=$(cat .environment)
|
||||
|
||||
terraform "$@" terraform
|
||||
cd terraform
|
||||
|
||||
terraform workspace select $ENVIRONMENT
|
||||
terraform "$@"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue