Skip to content

Instantly share code, notes, and snippets.

@rdkls
Created July 23, 2021 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdkls/22f4a3c91dd9074172e9c79409af7f13 to your computer and use it in GitHub Desktop.
Save rdkls/22f4a3c91dd9074172e9c79409af7f13 to your computer and use it in GitHub Desktop.
commands to prep an ec2 instance for terraform dev, by mounting local folder via sshfs
set -x
sudo amazon-linux-extras enable epel
sudo yum install epel-release fuse-sshfs
sudo sed -i s/\#\ user/user/g /etc/fuse.conf
sudo curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash
sudo wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.31.1/terragrunt_linux_amd64 -O /usr/bin/terragrunt
sudo chmod +x /usr/bin/terragrunt
sudo wget https://github.com/Versent/saml2aws/releases/download/v2.31.0/saml2aws_2.31.0_linux_amd64.tar.gz -O /usr/bin/saml2aws_2.31.0_linux_amd64.tar.gz
sudo tar -xzvf /usr/bin/saml2aws_2.31.0_linux_amd64.tar.gz
sudo chmod +x /usr/bin/saml2aws
mkdir -p ~/ws/security-infra-aws
echo "mount | grep fuse.sshfs || sshfs -o allow_other -p65530 nick.doyle@localhost:/Users/nick.doyle/ws/security-infra-aws ~/ws/security-infra-aws/" >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment