Skip to content

Instantly share code, notes, and snippets.

@denniswebb
Last active September 1, 2023 16:47
Show Gist options
  • Save denniswebb/cd759d29afa1e3cb91c1af8ed79ef2f1 to your computer and use it in GitHub Desktop.
Save denniswebb/cd759d29afa1e3cb91c1af8ed79ef2f1 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