Skip to content

Instantly share code, notes, and snippets.

View alemazz's full-sized avatar

alemazz alemazz

  • Italy, Pesaro(PU)
View GitHub Profile
@alemazz
alemazz / jenkins_on.sh
Last active November 6, 2015 10:13
jenkins EC2 instance switchon cronjob
#!/bin/bash
BACKUPLOG="/var/tmp/backuplogaws"
SENDTO="webmaster@example.com"
echo "start setup jenkinsCI" > ${BACKUPLOG} 2>&1
AMI_ID_OLD=$(aws ec2 describe-images --owner ***** --query 'Images[?starts_with(Name, `jenkinsAMI`) == `true`]|[0:5].[CreationDate,ImageId,Name]' --profile **** --output text | sort -k1 | tail -n1 | awk '{print $2}')
@alemazz
alemazz / jenkins_off.sh
Last active November 6, 2015 11:35
jenkins EC2 instance switchoff
#!/bin/bash
BACKUPLOG="/var/tmp/backuplogaws"
SENDTO="webmaster@example.com"
echo "start setup jenkinsCI" > ${BACKUPLOG} 2>&1
AMI_ID_OLD=$(aws ec2 describe-images --owner 184559516538 --query 'Images[?starts_with(Name, `jenkinsAMI`) == `true`]|[0:5].[CreationDate,ImageId,Name]' --profile **** --output text | sort -k1 | tail -n1 | awk '{print $2}')
sleep 20
@alemazz
alemazz / mapping.json
Created November 6, 2015 10:15
mapping for delete on termination volume
[
{
"DeviceName": "/dev/xvda",
"Ebs": {
"DeleteOnTermination": true,
"SnapshotId": "snap-***",
"VolumeSize": 80,
"VolumeType": "gp2"
}
}
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# module.cognito.aws_cognito_user_pool.this will be updated in-place
~ resource "aws_cognito_user_pool" "this" {
arn = "arn:aws:cognito-idp:eu-west-1:*****:userpool/*****"
auto_verified_attributes = []