This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disable_checkpoint = true | |
credentials_helper helper { | |
args = [] | |
} | |
# save this in home. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packer { | |
required_plugins { | |
qemu = { | |
source = "github.com/hashicorp/qemu" | |
version = "~> 1" | |
} | |
} | |
} | |
source "qemu" "alpine" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'securerandom' | |
puts "AKIA#{Array.new(16){[*"A".."Z", *"2".."7"].sample}.join}" | |
puts SecureRandom.base64(30) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/resolver/10.in-addr.arpa | |
nameserver 127.0.0.1 | |
port 8600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host * | |
StrictHostKeyChecking no | |
ServerAliveInterval 60 | |
FingerprintHash md5 | |
VisualHostKey yes | |
ControlPath /tmp/%r@%h:%p | |
IdentityFile ~/.ssh/id_rsa | |
Host github.com | |
ControlMaster auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authenticate via the AWS EC2 authentication method (IAM method). If authentication is | |
# successful, the resulting token will be stored on the client and used | |
# for future requests. | |
# | |
# @example | |
# Vault.auth.aws_ec2_iam("dev-role-iam", "vault.example.com") #=> #<Vault::Secret lease_id=""> | |
# | |
# @param [String] role | |
# @param [String] iam_auth_header_value | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
[ -z "$VAULT_ADDR" ] && VAULT_ADDR="https://127.0.0.1:8200" | |
case $1 in | |
store) | |
security add-generic-password -U -a "VAULT-$USER" -c "hvlt" -C "hvlt" -D "Hashicorp Vault" -s "$VAULT_ADDR" -w "$(cat)" | |
;; | |
get) |
NewerOlder