@@ -78,7 +78,7 @@ To disable pre-commit color output set `-e PRE_COMMIT_COLOR=never`.
78
78
[ ` coreutils ` ] ( https://formulae.brew.sh/formula/coreutils ) required for ` terraform_validate ` hook on macOS (due to use of ` realpath ` ).
79
79
80
80
``` bash
81
- brew install pre-commit gawk terraform-docs tflint tfsec coreutils checkov terrascan
81
+ brew install pre-commit terraform-docs tflint tfsec coreutils checkov terrascan
82
82
terrascan init
83
83
```
84
84
@@ -88,17 +88,16 @@ terrascan init
88
88
89
89
``` bash
90
90
sudo apt update
91
- sudo apt install -y gawk unzip software-properties-common
91
+ sudo apt install -y unzip software-properties-common
92
92
sudo add-apt-repository ppa:deadsnakes/ppa
93
93
sudo apt install -y python3.7 python3-pip
94
94
python3 -m pip install --upgrade pip
95
95
pip3 install --no-cache-dir pre-commit
96
96
python3.7 -m pip install -U checkov
97
- curl -L " $( curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E " https://.+?-linux-amd64.tar.gz" ) " > terraform-docs.tgz && tar xzf terraform-docs.tgz && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
98
- curl -L " $( curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E " https://.+?_linux_amd64.zip" ) " > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
99
- curl -L " $( curl -s https://api.github.com/repos/aquasecurity/tfsec/releases/latest | grep -o -E " https://.+?tfsec-linux-amd64" | head -n 1) " > tfsec && chmod +x tfsec && sudo mv tfsec /usr/bin/
100
- curl -L " $( curl -s https://api.github.com/repos/accurics/terrascan/releases/latest | grep -o -E " https://.+?_Linux_x86_64.tar.gz" ) " > terrascan.tar.gz && tar -xf terrascan.tar.gz terrascan && rm terrascan.tar.gz && sudo mv terrascan /usr/bin/
101
- terrascan init
97
+ curl -L " $( curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E -m 1 " https://.+?-linux-amd64.tar.gz" ) " > terraform-docs.tgz && tar -xzf terraform-docs.tgz && rm terraform-docs.tgz && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
98
+ curl -L " $( curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E -m 1 " https://.+?_linux_amd64.zip" ) " > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
99
+ curl -L " $( curl -s https://api.github.com/repos/aquasecurity/tfsec/releases/latest | grep -o -E -m 1 " https://.+?tfsec-linux-amd64" ) " > tfsec && chmod +x tfsec && sudo mv tfsec /usr/bin/
100
+ curl -L " $( curl -s https://api.github.com/repos/accurics/terrascan/releases/latest | grep -o -E -m 1" https://.+?_Linux_x86_64.tar.gz" ) " > terrascan.tar.gz && tar -xzf terrascan.tar.gz terrascan && rm terrascan.tar.gz && sudo mv terrascan /usr/bin/ && terrascan init
102
101
```
103
102
104
103
</details >
@@ -108,15 +107,14 @@ terrascan init
108
107
109
108
``` bash
110
109
sudo apt update
111
- sudo apt install -y gawk unzip software-properties-common python3 python3-pip
110
+ sudo apt install -y unzip software-properties-common python3 python3-pip
112
111
python3 -m pip install --upgrade pip
113
112
pip3 install --no-cache-dir pre-commit
114
113
pip3 install --no-cache-dir checkov
115
- curl -L " $( curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E " https://.+?-linux-amd64.tar.gz" ) " > terraform-docs.tgz && tar -xzf terraform-docs.tgz terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
116
- curl -L " $( curl -s https://api.github.com/repos/accurics/terrascan/releases/latest | grep -o -E " https://.+?_Linux_x86_64.tar.gz" ) " > terrascan.tar.gz && tar -xf terrascan.tar.gz terrascan && rm terrascan.tar.gz && sudo mv terrascan /usr/bin/
117
- terrascan init
118
- curl -L " $( curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E " https://.+?_linux_amd64.zip" ) " > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
119
- curl -L " $( curl -s https://api.github.com/repos/aquasecurity/tfsec/releases/latest | grep -o -E " https://.+?tfsec-linux-amd64" | head -n 1) " > tfsec && chmod +x tfsec && sudo mv tfsec /usr/bin/
114
+ curl -L " $( curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E -m 1 " https://.+?-linux-amd64.tar.gz" ) " > terraform-docs.tgz && tar -xzf terraform-docs.tgz terraform-docs && rm terraform-docs.tgz && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
115
+ curl -L " $( curl -s https://api.github.com/repos/accurics/terrascan/releases/latest | grep -o -E -m 1" https://.+?_Linux_x86_64.tar.gz" ) " > terrascan.tar.gz && tar -xzf terrascan.tar.gz terrascan && rm terrascan.tar.gz && sudo mv terrascan /usr/bin/ && terrascan init
116
+ curl -L " $( curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E -m 1 " https://.+?_linux_amd64.zip" ) " > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
117
+ curl -L " $( curl -s https://api.github.com/repos/aquasecurity/tfsec/releases/latest | grep -o -E -m 1 " https://.+?tfsec-linux-amd64" ) " > tfsec && chmod +x tfsec && sudo mv tfsec /usr/bin/
120
118
```
121
119
122
120
</details >
0 commit comments