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
variable "stack" { | |
description = "Seperates Blue and Green stacks" | |
default = "blue" | |
} |
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
provider "aws" { | |
region = "ap-southeast-2" | |
} | |
terraform { | |
required_version = ">= 0.11.0" | |
backend "s3" { | |
encrypt = 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ssm:DescribeAssociation", | |
"ssm:GetDeployablePatchSnapshotForInstance", | |
"ssm:GetDocument", | |
"ssm:GetParameters", |
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
... | |
# Forward grafana logs to docker log collector | |
RUN ln -sf /dev/stdout /var/log/grafana.log | |
... |
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 | |
# SSM agent | |
sudo apt-get update && sudo apt-get install -y build-essential | |
curl https://amazon-ssm-ap-southeast-2.s3.amazonaws.com/latest/debian_amd64/amazon-ssm-agent.deb -o /tmp/amazon-ssm-agent.deb | |
sudo dpkg -i /tmp/amazon-ssm-agent.deb | |
sudo systemctl start amazon-ssm-agent |
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
image: geoscienceaustralia/autobots-terraform | |
pipelines: | |
branches: | |
master: | |
- step: | |
script: | |
- export TF_VAR_archive=appname-"$(date +%s)".tar.gz | |
- tar -cvzf $TF_VAR_archive appname | |
- export TF_VAR_stack_name=appname |
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
#============================================================== | |
# Vpc.tf | |
#============================================================== | |
# Create a VPC Peering connection and setup routes on both sides | |
# Create a VPC peering connection | |
resource "aws_vpc_peering_connection" "admin_dblink_peer" { |
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
apt-get -qq update | |
apt-get -qq -y install curl |
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
[general] | |
state_file = /var/awslogs/state/agent-state | |
[/var/log/syslog] | |
file = /var/log/syslog | |
log_group_name = appname | |
log_stream_name = {instance_id}-/var/log/syslog | |
datetime_format = %b %d %H:%M:%S | |
[/var/log/tomcat8/catalina.out] |
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
# Does your build get stuck here: | |
# amazon-ebs: A new version of /boot/grub/menu.lst is available, but the version installed | |
# amazon-ebs: currently has been locally modified. | |
# amazon-ebs: | |
# amazon-ebs: 1. install the package maintainer's version | |
# amazon-ebs: 2. keep the local version currently installed | |
# amazon-ebs: 3. show the differences between the versions | |
# amazon-ebs: 4. show a side-by-side difference between the versions | |
# amazon-ebs: 5. show a 3-way difference between available versions |