Skip to content

Instantly share code, notes, and snippets.

View p0bailey's full-sized avatar
😃
"A smooth sea never made a skilled sailor."

Phillip Bailey p0bailey

😃
"A smooth sea never made a skilled sailor."
  • Stack42
  • London (uk)
View GitHub Profile
@p0bailey
p0bailey / Makefile
Last active March 27, 2021 09:22
Terraform Makefile
MAKEFLAGS += --silent
.PHONY: all init plan apply show destroy output graph
all:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
init: ## Initialize a new or existing Terraform configuration
terraform validate
terraform init
{
    "body": {
        "key": {
            "eldest_kid": "0120b09faec5a707c96c64c74fd2531cd384e00490422fb6e7fc5249adf8ff1228eb0a",
            "host": "keybase.io",
            "kid": "0120b09faec5a707c96c64c74fd2531cd384e00490422fb6e7fc5249adf8ff1228eb0a",
            "uid": "5f7e6bea1f97ceb2f1d0916f9054d119",
            "username": "pbailey"
        },
@p0bailey
p0bailey / README.md
Last active August 1, 2019 00:01
Terraform Module README

demo terraform module

A terraform module to provide a in AWS/AZURE/ETC,ETC.

This should be used an a generic template to be included in every terraform module.

Module Input Variables

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :hosts do |provisioner|
provisioner.autoconfigure = true
@p0bailey
p0bailey / MalformedPolicyDocument: Invalid principal in policy: "AWS"
Created June 8, 2016 13:43
MalformedPolicyDocument: Invalid principal in policy: "AWS"
terraform apply -var-file=../../aws.tfvars
aws_iam_role.SecurityMonkeyInstanceProfile: Creating...
arn: "" => "<computed>"
assume_role_policy: "" => "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Action\": \"sts:AssumeRole\"\n }\n ]\n }"
name: "" => "SecurityMonkeyInstanceProfile"
path: "" => "/"
unique_id: "" => "<computed>"
aws_iam_role.SecurityMonkeyInstanceProfile: Creation complete
aws_iam_role.SecurityMonkey: Creating...
arn: "" => "<computed>"
@p0bailey
p0bailey / .gitignore
Last active August 29, 2015 14:11
GitIgnore
env/
venv/
*.pyc
db.sqlite3