You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.8 KiB
Bash
57 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
# vim:ts=4:sts=4:sw=4:et
|
|
#
|
|
# Author: Hari Sekhon
|
|
# Date: Mon Feb 22 17:42:01 2021 +0000
|
|
#
|
|
# https://github.com/HariSekhon/DevOps-Bash-tools
|
|
#
|
|
# License: see accompanying Hari Sekhon LICENSE file
|
|
#
|
|
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
|
|
#
|
|
# https://www.linkedin.com/in/HariSekhon
|
|
#
|
|
|
|
# ============================================================================ #
|
|
# D i r e n v
|
|
# ============================================================================ #
|
|
|
|
# https://direnv.net/man/direnv-stdlib.1.html
|
|
|
|
# See Also:
|
|
#
|
|
# .envrc-aws
|
|
# .envrc-gcp
|
|
# .envrc-kubernetes
|
|
|
|
# direnv stdlib - loads .envrc from parent dir up to /
|
|
#
|
|
# useful to accumulate parent and child directory .envrc settings eg. adding Kubernetes namespace, ArgoCD app etc.
|
|
#
|
|
# bypasses security authorization though - use with care
|
|
#source_up
|
|
#
|
|
# source_up must be loaded before set -u otherwise gets this error:
|
|
#
|
|
# direnv: loading .envrc
|
|
# /bin/bash: line 226: $1: unbound variable
|
|
|
|
set -euo pipefail
|
|
[ -n "${DEBUG:-}" ] && set -x
|
|
srcdir="$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
export COMPOSE_PROJECT_NAME="bash-tools"
|
|
|
|
#export CLOUDFLARE_EMAIL=hari@...
|
|
#export CLOUDFLARE_API_KEY=... # generate here: https://dash.cloudflare.com/profile/api-tokens
|
|
#export CLOUDFLARE_TOKEN=... # used by cloudflare_api.sh but not by terraform module
|
|
|
|
# export the variables for terraform
|
|
#export TF_VAR_cloudflare_email="$CLOUDFLARE_EMAIL"
|
|
#export TF_VAR_cloudflare_api_key="$CLOUDFLARE_API_KEY" # must be a key, not a token using the link above
|
|
|
|
# XXX: safer to inline .envrc-kubernetes if you're worried about changes to it bypassing 'direnv allow' authorization
|
|
# shellcheck disable=SC1090
|
|
. "$srcdir/.envrc-kubernetes" docker-desktop
|