Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .envrc.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
export AWS_DEFAULT_PROFILE="your-aws-profile-name"
export TF_VAR_github_app_pem="$(< /path/to/github-app-private-key.pem)"

ssm_values="$(
aws --profile "$AWS_DEFAULT_PROFILE" ssm get-parameters \
--names \
"/infra/opensgf/infra-gh/TF_VAR_github_app_pem" \
--with-decryption --output json --no-cli-pager |
jq '.Parameters | map({key: (.Name | split("/") | last), value: .Value}) | from_entries'
)"

export TF_VAR_github_app_pem="$(jq -r '.TF_VAR_github_app_pem' <<< "$ssm_values")"

unset ssm_values
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tf-apply:
@source "$(ENVRC)" && tofu -chdir=$(TF_DIR) apply $(ARGS)

tf-validate:
@source "$(ENVRC)" && tofu -chdir=$(TF_DIR) validate
@tofu -chdir=$(TF_DIR) validate

tf-format:
@tofu -chdir=$(TF_DIR) fmt -check -recursive
Expand Down