Skip to content

Instantly share code, notes, and snippets.

View rnhurt's full-sized avatar

Richard Hurt rnhurt

View GitHub Profile
@rnhurt
rnhurt / packer.json
Created August 13, 2019 17:48
InvalidParameterValue Error using the "amazon-ebs builder" #7981
{
"variables": {
"ami_name": "",
"build_id": "",
"aws_region": "us-east-1",
"copy_aws_region": "us-east-2",
"ec2_instance_type": "",
"instance_profile": "",
"encrypt": "",
"kms_cmk": "",
@rnhurt
rnhurt / crash.log
Last active August 7, 2019 18:53
Packer SegFault when Ansible returns non-zero exit on AWS
2019/08/07 18:08:53 [INFO] Packer version: 1.4.0
2019/08/07 18:08:53 Packer Target OS/Arch: linux amd64
2019/08/07 18:08:53 Built with Go Version: go1.12
2019/08/07 18:08:53 Detected home directory from env var: /home/ec2-user
2019/08/07 18:08:53 Using internal plugin for azure-arm
2019/08/07 18:08:53 Using internal plugin for hcloud
2019/08/07 18:08:53 Using internal plugin for tencentcloud-cvm
2019/08/07 18:08:53 Using internal plugin for hyperv-iso
2019/08/07 18:08:53 Using internal plugin for hyperv-vmcx
2019/08/07 18:08:53 Using internal plugin for qemu
@rnhurt
rnhurt / install.sh
Created May 14, 2019 20:26
RVM Error: "/usr/local/rvm/scripts/functions/support: line 182: _system_name: unbound variable"
#!/usr/bin/env bash
set -euo pipefail
prt ()
{
echo -e "\n\n" `date +'%Y-%m-%d %H:%M:%S'` "$1 \n"
}
prt "Installing Ruby"
@rnhurt
rnhurt / domain-fails
Last active October 26, 2017 17:03
[Go] GoDaddy API files not being generated properly #6811
{
"apiVersion": "2.4.9",
"apis": [
{
"operations": [{ "method": "GET" } ],
"path": "/v1/domains"
}
],
"models": {
"Error": {
@rnhurt
rnhurt / cfn_decrypt.js
Created November 22, 2016 14:42
Decrypting CloudFormation secrets using a Lamba function
'use strict';
const https = require('https');
const url = require('url');
function sendResponse(event, callback, logStreamName, responseStatus, responseData) {
const responseBody = JSON.stringify({
Status: responseStatus,
Reason: `See the details in CloudWatch Log Stream: ${logStreamName}`,
PhysicalResourceId: logStreamName,
@rnhurt
rnhurt / build.js
Created April 4, 2015 15:24
Cloud Formation Templates
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var hbs = require('handlebars');
var globals = JSON.parse(fs.readFileSync(__dirname+'/templates/common/globals.json'));
// Register Handlebars "helpers"
hbs.registerHelper('toLowerCase', function (str) { return str.toLowerCase(); });
hbs.registerHelper('toUpperCase', function (str) { return str.toUpperCase(); });
@rnhurt
rnhurt / base-instance.hbs
Created April 3, 2015 02:26
Cloud Formation Templates
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Project: {{ProjectName}}.",
"Mappings" : {
{{#each Mappings}}{{{this}}}
{{/each}}
},
"Conditions" : {
@rnhurt
rnhurt / stage.hbs
Last active August 29, 2015 14:18
Cloud Formation Templates
"EnvType" : "stage",
"EnvRegions" : [
{
"Id" : "us-east-1",
"Name" : "USEast1",
"VPCId" : "vpc-456qwe",
"CacheSubnetGroupName" : "vpc-s-1"
},
{
@rnhurt
rnhurt / global.json
Last active August 29, 2015 14:18
Cloud Formation Templates
{
"IPAddresses": {
"Home" : ["1.2.3.4/32"],
"Home" : ["5.6.7.8/32"]
},
"Regions" : [
{
"Id" : "us-east-1",
"Name" : "USEast1",