Skip to content

Instantly share code, notes, and snippets.

View tristanmorgan's full-sized avatar
⌨️
tappity tap.

Tristan Morgan tristanmorgan

⌨️
tappity tap.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tristanmorgan on github.
  • I am tristanmorgan (https://keybase.io/tristanmorgan) on keybase.
  • I have a public key ASDtv9LpwPydVjuqv7_D-FGUp14BUQ9rchfq59DpOGSm1go

To claim this, I am signing this object:

$ TF_LOG=debug terraform apply -auto-approve -no-color
2021-12-22T15:49:42.089+1100 [INFO] Terraform version: 1.1.2
2021-12-22T15:49:42.089+1100 [INFO] Go runtime version: go1.17.2
2021-12-22T15:49:42.089+1100 [INFO] CLI args: []string{"terraform", "apply", "-auto-approve", "-no-color"}
2021-12-22T15:49:42.089+1100 [DEBUG] Attempting to open CLI config file: /Users/tristanmorgan/.terraformrc
2021-12-22T15:49:42.089+1100 [INFO] Loading CLI configuration from /Users/tristanmorgan/.terraformrc
2021-12-22T15:49:42.090+1100 [DEBUG] checking for credentials in "/Users/tristanmorgan/.terraform.d/plugins"
2021-12-22T15:49:42.090+1100 [DEBUG] found credentials "terraform-credentials-keychain_v1.0.0"
2021-12-22T15:49:42.090+1100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2021-12-22T15:49:42.090+1100 [DEBUG] will search for provider plugins in /Users/tristanmorgan/.terraform.d/plugins
@tristanmorgan
tristanmorgan / 10.in-addr.arpa
Created March 6, 2022 23:47
Use Consul DNS for ".consul" and reverse IP lookups on macOS
# /etc/resolver/10.in-addr.arpa
nameserver 127.0.0.1
port 8600
@tristanmorgan
tristanmorgan / hashup.sh
Last active October 28, 2022 02:51
Quick script to download latest HashiCorp binaries. (for arm mac)
#!/bin/sh
set -e
export CHECKPOINT_DISABLE=1
download() {
echo checking $1
TF_TAGS_FEED="https://api.releases.hashicorp.com/v1/releases/$1/latest"
RELEASE_JSON=$(curl -s -H "Cache-Control: no-cache" "$TF_TAGS_FEED")
LATEST_VERSION=$(echo ${RELEASE_JSON} | jq -r .version )
@tristanmorgan
tristanmorgan / alpine-img.pkr.hcl
Last active August 3, 2023 04:32
Packer file to build an Alpine Linux image for Qemu
packer {
required_plugins {
qemu = {
source = "github.com/hashicorp/qemu"
version = "~> 1"
}
}
}
source "qemu" "alpine" {
@tristanmorgan
tristanmorgan / aws-key-gen.rb
Created April 28, 2023 04:14
Generate an AWS access key ID and secret that passes the regex in AWSKeyring.
#!/usr/bin/env ruby
require 'securerandom'
puts "AKIA#{Array.new(16){[*"A".."Z", *"2".."7"].sample}.join}"
puts SecureRandom.base64(30)
@tristanmorgan
tristanmorgan / gen-aws-keys.sh
Last active April 8, 2024 22:29
Generate fake AWS creds for testing using awskeyring and aws(ruby)cli
#!/bin/sh
TEMP_KEY=$(aws sts generate-fake-key)
AWS_ACCESS_KEY_ID=$(jq -r .access_key.access_key_id <<< $TEMP_KEY)
echo export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
echo export AWS_SECRET_ACCESS_KEY=$(jq -r .access_key.secret_access_key <<< $TEMP_KEY)
echo export AWS_ACCOUNT_ID=$(awskeyring decode $AWS_ACCESS_KEY_ID)