Skip to content

Commit

Permalink
Merge pull request #74 from rackspace-infrastructure-automation/jcc/m…
Browse files Browse the repository at this point in the history
…pcsupeng-1360

Userdata CFN Bugfix
  • Loading branch information
twistedgrim committed Jul 21, 2020
2 parents 9bca216 + 8ef3065 commit 7fde7c7
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This module creates one or more autorecovery instances.

```HCL
module "ar" {
source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery//?ref=v0.12.8"
source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery//?ref=v0.12.10"
ec2_os = "amazon"
subnets = module.vpc.private_subnets
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_cw_agent_config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module "vpc" {
}

module "ec2_ar_with_codedeploy" {
source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery?ref=v0.12.8"
source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery?ref=v0.12.10"

ec2_os = "rhel6"
instance_count = 1
Expand Down
2 changes: 1 addition & 1 deletion examples/managed.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data "aws_region" "current_region" {
}

module "ec2_ar" {
source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery?ref=v0.12.8"
source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery?ref=v0.12.10"

backup_tag_value = "False"
detailed_monitoring = true
Expand Down
2 changes: 1 addition & 1 deletion examples/unmanaged.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module "sns" {
}

module "unmanaged_ar" {
source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery?ref=v0.12.8"
source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery?ref=v0.12.10"

ec2_os = "centos7"
instance_count = 1
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* ```HCL
* module "ar" {
* source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery//?ref=v0.12.8"
* source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-ec2_autorecovery//?ref=v0.12.10"
*
* ec2_os = "amazon"
* subnets = module.vpc.private_subnets
Expand Down
3 changes: 3 additions & 0 deletions text/rhel_centos_6_userdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ${initial_commands}

exec 1> >(logger -s -t $(basename $0)) 2>&1

# Ensure SSM installed on Amazon Linux
# in cases where it is not available / removed

mkdir -p /opt/aws/bin
cd /opt/aws
curl https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm -o /tmp/epel-release-latest-6.noarch.rpm
Expand Down
3 changes: 3 additions & 0 deletions text/rhel_centos_7_userdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ${initial_commands}

exec 1> >(logger -s -t $(basename $0)) 2>&1

# Ensure SSM installed on Amazon Linux
# in cases where it is not available / removed

mkdir -p /opt/aws/bin
cd /opt/aws
curl https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -o /tmp/epel-release-latest-7.noarch.rpm
Expand Down
5 changes: 4 additions & 1 deletion text/rhel_centos_8_userdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ${initial_commands}

exec 1> >(logger -s -t $(basename $0)) 2>&1

# Ensure SSM installed on Amazon Linux
# in cases where it is not available / removed

mkdir -p /opt/aws/bin
cd /opt/aws
curl https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -o /tmp/epel-release-latest-8.noarch.rpm
Expand All @@ -18,7 +21,7 @@ if [[ $ssm_running != "0" ]]; then
else
if [[ -r "/tmp/ssm_agent_install" ]]; then : ;
else mkdir -p /tmp/ssm_agent_install; fi
curl https://s3.<obj>region</obj>.amazonaws.com/amazon-ssm-<obj>region</obj>/latest/linux_amd64/amazon-ssm-agent.rpm -o /tmp/ssm_agent_install/amazon-ssm-agent.rpm
curl https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm -o /tmp/ssm_agent_install/amazon-ssm-agent.rpm
rpm -Uvh /tmp/ssm_agent_install/amazon-ssm-agent.rpm
ssm_running=$( ps -ef | grep [a]mazon-ssm-agent | wc -l )
systemctl=$( command -v systemctl | wc -l )
Expand Down
3 changes: 3 additions & 0 deletions text/ubuntu_userdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ exec 1> >(logger -s -t $(basename $0)) 2>&1
export LC_ALL=C.UTF-8
export DEBIAN_FRONTEND=noninteractive

# Ensure SSM installed on Amazon Linux
# in cases where it is not available / removed

apt-get update
apt-get -y install python-setuptools python-pip
pip install awscli --upgrade
Expand Down

0 comments on commit 7fde7c7

Please sign in to comment.