Skip to content

Instantly share code, notes, and snippets.

View nickithewatt's full-sized avatar

Nicki Watt nickithewatt

View GitHub Profile
@nickithewatt
nickithewatt / demos\acme-consolidated\variables.tf
Last active January 22, 2017 23:00
variable fragment used within Let's Encrypt Terraform blog post
# Let's Encrypt Account Registration Config
# -- Production
# variable "demo_acme_server_url" { default = "https://acme.api.letsencrypt.org/directory"}
# variable "demo_acme_registration_email" { default = "your-email@your-company.com" }
# -- Staging
variable "demo_acme_server_url" { default = "https://acme-staging.api.letsencrypt.org/directory"}
variable "demo_acme_registration_email" { default = "your-email@example.com" }
# Domain against which certificate will be created
# i.e. letsencrypt-terraform.ocdemo.net
├── demos
│   ├── acme-consolidated
│   │   ├── main.tf
│   │   └── variables.tf
│   ├── acme-part-1-registration
│   │   ├── main.tf
│   │   └── variables.tf
│   └── acme-part-2-core
│   ├── main.tf
│   └── variables.tf
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but
will not be persisted to local or remote state storage.
...
<= data.template_file.example
rendered: "<computed>"
template: "\nmsg1 = ${msg1}\nmsg2 = ${msg2}\nmsg3 = ${msg3}\nmsg4 = ${msg4}\nmsg5 = ${msg5}\nmsg6 = ${msg6}\nmsg7 = ${msg7}"
vars.%: "7"
# Some comment
pretend_aws_access_key = "madeup-aws-access-key-PEJFNS"
pretend_aws_secret_key = "madeup-aws-secret-key-KGSDGH"
tf_sensitive_key_1 = "sensitive-value-1-AK#%DJGHS*G"
tf_sensitive_key_2 = "sensitive-value-2-prYh57"
tf_sensitive_key_3 = "sensitive-value-3-//dfhs//"
# Some more comments
tf_sensitive_key_4 = "sensitive-value-4 with equals sign i.e. ff=yy"
tf_sensitive_key_6 = "sensitive-value-6"
# ----------------------------------------------------------------
# sensitive variables (should be passed in via tfvars)
# ----------------------------------------------------------------
variable "pretend_aws_access_key" {}
variable "pretend_aws_secret_key" {}
variable "tf_sensitive_key_1" {}
variable "tf_sensitive_key_2" {}
variable "tf_sensitive_key_3" {}
variable "tf_sensitive_key_4" {}
variable "tf_sensitive_key_6" {}
# -------------------------------------------------
# Example terraform file based on 0.7.7
# -------------------------------------------------
provider "aws" {
access_key = "${var.pretend_aws_access_key}"
secret_key = "${var.pretend_aws_secret_key}"
region = "us-east-1"
}
data "template_file" "example" {
@nickithewatt
nickithewatt / bumpme
Last active September 17, 2016 22:55
Sat Sep 17 22:55:18 UTC 2016

Keybase proof

I hereby claim:

  • I am nickithewatt on github.
  • I am nickiwatt (https://keybase.io/nickiwatt) on keybase.
  • I have a public key ASDi9cLzkzA6CPP8xx8zHKTpiU0sdPl4wLQKPJ9DTGtMzgo

To claim this, I am signing this object:

@nickithewatt
nickithewatt / wrapdocker.sh
Created November 19, 2015 16:07
wrapdocker script capable of being used to run docker in docker (dind) with jenkins mesos-plugin
#!/bin/bash
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
echo " ABOUT TO START DOCKER ... "
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
# --------------------------------------------------------------------------
# primarily based on https://github.com/jpetazzo/dind/blob/master/wrapdocker
# --------------------------------------------------------------------------
@nickithewatt
nickithewatt / Vagrantfile
Last active August 29, 2015 14:20
Initial fixes for Jellyfish bootstrap issues with puppet ref https://github.com/projectjellyfish/puppet-jellyfish/issues/4
# -*- mode: ruby -*-
# # vi: set ft=ruby :
require 'fileutils'
Vagrant.require_version ">= 1.6.5"
# 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|