Skip to content

Instantly share code, notes, and snippets.

@mlrobinson
mlrobinson / bootstrap.sh
Last active March 9, 2016 22:35
Bootstrap script for my testing...
#!/usr/bin/env bash
set -e
### User Config Variables Start ###
REMOTE_REPO="https://[email protected]/mlrobinson/infra-macbook-configuration.git"
# Exported for use in ensup and other scripts for finding our repo's home
export ANSIBLE_CONFIG_DIR="$HOME/.ansible.d"
### User Config Variables End ###
@mlrobinson
mlrobinson / main.tf
Created January 6, 2016 19:29
Example Lookup Module
variable "vpc_id" {
description = "VPC ID to create the subnet in"
}
# Just setup multiple of these as needed
variable "sec_internal_admin" {
description = "The security group ID for the internal admin group"
default {
vpc-blahblah = "sg-deadbeef"
vpc-etcetcet = "sg-00000001"
#!/usr/bin/env python
# This is a trick, to output the bash commands we need to run in shell, and just execute this script inside an eval within our shell, so it imports what we need
# Possibly tie this in with https://gist.github.com/mbainter/b38a4cb411c0b5c1bae6 for MFA support
# Will need to durably store MFA access tokens, possibly in some other env vars
# Could also store all different keys/info in different vars, to reuse as needed (lots of env vars though, file may be better)
import os
import sys
import getpass