-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.sh
43 lines (28 loc) · 1.14 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Make bin directory and change back to terraform-test-framework-workshop directory
# cd ../../.. && mkdir bin && cd ec2-user/environment/terraform-test-framework-workshop
# Amazon Linux 2023
# Install Homebrew
export NONINTERACTIVE=1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add Homebrew to $PATH (uncomment below line if using Amazon Linux 2 Image)
# (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/ec2-user/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# Check Homebrew version to validte installation
brew -v
# Install Terraform (if not already installed) - likely will install v1.5.7
brew install terraform
# Unlink Terraform so tfenv can be installed
brew unlink terraform
# Install tfenv
brew install tfenv
# Check tfenv version to validte installation
tfenv -v
# Download and switch to to latest version of Terraform
tfenv use latest
# Validate that v1.6 or higher of Terraform is installed
terraform -v
# Install Checkov
brew install checkov
# Check Checkov version to validte installation
checkov -v
echo Setup finished successfully!