In some cases the IC might determine that a PM meeting for the incident isn't needed.
If the IC decides to waive the meeting please replace the Meeting
section with a
note indicating the meeting has been waived (example: Meeting waived: Paul Mooring
)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo "deploying $1" | |
rm -rf .terraform | |
# Deploy Network Infrastructure | |
export WORKSPACE=$1 | |
terraform init -backend-config workspaces/$WORKSPACE/backend.cfg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## aws vault | |
# use login keychain for longer sessions | |
AWS_VAULT_KEYCHAIN_NAME=login | |
# call ap to change profile | |
function ap { export AWS_PROFILE="$@"; } | |
export AWS_PROFILE="default" | |
# make aws-vault easier to use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"source_ami_filter": { | |
"filters": { | |
"virtualization-type": "hvm", | |
"name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", | |
"root-device-type": "ebs" | |
}, | |
"owners": ["099720109477"], | |
"most_recent": true | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export zone_name="app.com." | |
export address="staging.app.com." | |
zoneid=$(aws route53 list-hosted-zones | jq -r '.HostedZones[] | select(.Name == env.zone_name) | .Id') | |
staging=$(aws route53 list-resource-record-sets --hosted-zone-id "$zoneid" | jq -r '.ResourceRecordSets[] | select(.Name == env.address) | select(.AliasTarget.DNSName != null) | .AliasTarget.DNSName | split(".") | first') | |
if [ -z "$staging" ];then | |
echo "Error: Could not accurately determine staging" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export zone_name="app.com." | |
export address="staging.app.com." | |
zoneid=$(aws route53 list-hosted-zones | jq -r '.HostedZones[] | select(.Name == env.zone_name) | .Id') | |
staging=$(aws route53 list-resource-record-sets --hosted-zone-id "$zoneid" | jq -r '.ResourceRecordSets[] | select(.Name == env.address) | select(.AliasTarget.DNSName != null) | .AliasTarget.DNSName | split(".") | first') | |
if [ -z "$staging" ];then | |
echo "Error: Could not accurately determine staging" | |
exit 1 | |
fi | |
echo "$staging is staging" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export REGION=ap-southeast-2 | |
export TF_VAR_application=app | |
export TF_VAR_environment=dev | |
export STATE_BUCKET=app-name-$TF_VAR_environment | |
export STATE_TABLE=terraform-state-lock | |
pushd stack | |
export TF_VAR_stack=blue | |
terraform init \ | |
-backend-config "bucket=$STATE_BUCKET" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find your route53 zone | |
data "aws_route53_zone" "selected" { | |
name = "app.com." | |
} | |
# Create a record in that zone and point it at our ELB | |
resource "aws_route53_record" "elb" { | |
zone_id = "${data.aws_route53_zone.selected.zone_id}" | |
name = "${var.stack}" | |
type = "A" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-------------------------------------------------------------- | |
# Locals | |
#-------------------------------------------------------------- | |
# Locals can be used to combine variables and make them easier | |
# to reference | |
locals { | |
name_tag_prefix = "${var.environment}-${var.stack}-${var.application}" | |
} |