Skip to content

Instantly share code, notes, and snippets.

View fernandohonig's full-sized avatar

Fernando Honig fernandohonig

View GitHub Profile
{
"Version": "2012-10-17",
"Statement": [{
"Action": "ec2:*",
"Effect": "Allow",
"Resource": "*",
"Condition": {
"StringEquals": {
"ec2:Region": [
"us-east-1",
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"S3Bucket" : {
"Type" : "AWS::S3::Bucket",
"Properties" : {
}
}
},
"Outputs" : {
{
"Parameters" : {
"VPCID" : {
"Type" : "AWS::EC2::VPC::Id",
"Description" : "Select Virtual Private Cloud ID"
},
"ELBSubnet" : {
"Type" : "List<AWS::EC2::Subnet::Id>",
"Description" : "Subnets for Elastic Loadbalancer"
},
{
"Parameters": {
"CIDRRange": {
"Description": "VPCCIDR Range (will be a /16 block)",
"Type": "String",
"Default": "10.251.0.0",
"AllowedValues": ["10.250.0.0","10.251.0.0"]
}
},
"Mappings": {
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Parameters" : {
"BucketName": {
"Description": "Name of MyS3Bucket",
"Type": "String",
"Default": "mys3bucketacloudgurutraining"
}
},
"Resources" : {
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description": "Template for combining all templates into one nested template for testing.",
"Parameters": {
"VpcURL": {
"Type": "String",
"Default": "https://s3.amazonaws.com/mys3bucketacloudguru/vpc.template",
"Description": "Template URL for VPC Network."
},
"WordpressURL": {
var http = require ('https');
var querystring = require ('querystring');
exports.handler = function(event, context) {
console.log(event);
var message = JSON.parse(event.Message);
var color = 'warning';
switch(message.NewStateValue) {
case "OK":
color = 'good';
@fernandohonig
fernandohonig / heat-template
Created November 12, 2014 12:30
Heat Template to deploy a full ELK stack
heat_template_version: 2013-05-23
description: |
ELK stack Unlocked 18th November 2014
# START OUTPUT SECTION ###########################################
outputs:
load_balancer_ip:
value: { get_attr: [kibana_loadbalancer, PublicIp] }
description: Kibana Load Balancer public IP