Skip to content

Instantly share code, notes, and snippets.

@l0ris
Forked from denniswebb/aws_cli_install.tf
Created February 1, 2018 08:33
Show Gist options
  • Save l0ris/38b8dcec77dc04d1ca208e3db813fd5c to your computer and use it in GitHub Desktop.
Save l0ris/38b8dcec77dc04d1ca208e3db813fd5c to your computer and use it in GitHub Desktop.
Terraform module to install aws cli for Terraform Enterprise (Atlas)
data "template_file" "main" {
template = <<EOF
set -e
WORKDIR=/tmp/${uuid()}
mkdir -p "$WORKDIR"
cd "$WORKDIR"
curl -f "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
./awscli-bundle/install -i "$WORKDIR"/aws
EOF
}
output "script" {
value = "${data.template_file.main.rendered}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment