Skip to content

Instantly share code, notes, and snippets.

View denniswebb's full-sized avatar

Dennis Webb denniswebb

View GitHub Profile
@denniswebb
denniswebb / github.tf
Created October 3, 2017 16:45
Terraform module for creating GitHub repositories.
variable "repository_name" {}
variable "auto_init" {
default = true
}
variable "description" {
default = ""
}
data "aws_region" "current" {
current = true
}
module "aws_cli_install" {
source = "../aws_cli_install"
}
data "template_file" "main" {
template = <<EOF
@denniswebb
denniswebb / aws_cli_install.tf
Last active September 1, 2023 16:47
Terraform module to install aws cli for Terraform Enterprise (Atlas)
data "template_file" "main" {
template = <<EOF
set -e
WORKDIR=/tmp/${uuid()}
mkdir -p "$WORKDIR"
cd "$WORKDIR"
curl -f "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
./awscli-bundle/install -i "$WORKDIR"/aws
@denniswebb
denniswebb / keybase.md
Last active August 23, 2018 01:06
keybase.md

Keybase proof

I hereby claim:

  • I am denniswebb on github.
  • I am dhwebb (https://keybase.io/dhwebb) on keybase.
  • I have a public key ASDGWe1yawPF5lcPtJjxamPO7euHSiJiQo2_thZrakxEuQo

To claim this, I am signing this object:

@denniswebb
denniswebb / userdata_i3_8x.sh
Created April 16, 2017 19:04
Userdata for configuring RAID0 on AWS i3.8xlarge
#!/usr/bin/env bash
mkdir -p /data
mdadm --create --verbose --level=0 /dev/md0 --name=DATA --raid-devices=4 /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1
mdadm --wait /dev/md0
mkfs.ext4 /dev/md0
mdadm --detail --scan >> /etc/mdadm.conf
dracut -H -f /boot/initramfs-$(uname -r).img $(uname -r)
echo /dev/md0 /data ext4 defaults,nofail,noatime,discard 0 2 >> /etc/fstab
mount -a
@denniswebb
denniswebb / swagger-ui.tf
Created October 11, 2016 02:55
Terraform template for deploying Swagger-UI to S3 website.
variable "region" {default = "us-west-2"}
variable "website_dns" {default = "swagger-ui.webblab.info"}
variable "r53_zone_id" {default = "Z1S59LUERGUH56"}
variable "swagger_ui_version" {default = "v2.2.5"}
provider "aws" {
region = "${var.region}"
}
resource "aws_s3_bucket" "main" {