File tree 5 files changed +49
-2
lines changed
5 files changed +49
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
9
9
## [ Unreleased]
10
10
11
+ ## [ 1.1.0] - 2024-08-22
12
+
13
+ ### Changed
14
+
15
+ - Added ` tflint `
16
+
11
17
## [ 1.0.0] - 2024-05-13
12
18
13
19
### Changed
Original file line number Diff line number Diff line change 1
1
{
2
2
"id" : " terraform" ,
3
- "version" : " 1.0 .0" ,
3
+ "version" : " 1.1 .0" ,
4
4
"name" : " Terraform" ,
5
5
"documentationURL" : " https://github.com/ministryofjustice/.devcontainer/tree/main/features/src/terraform" ,
6
- "description" : " Installs the Terraform CLI" ,
6
+ "description" : " Installs the Terraform CLI and tflint " ,
7
7
"options" : {
8
8
"terraformCliVersion" : {
9
9
"type" : " string" ,
10
10
"description" : " Version of the Terraform CLI to install" ,
11
11
"proposals" : [" latest" ],
12
12
"default" : " latest"
13
+ },
14
+ "tflintVersion" : {
15
+ "type" : " string" ,
16
+ "description" : " Version of the tflint to install" ,
17
+ "proposals" : [" latest" ],
18
+ "default" : " latest"
13
19
}
14
20
},
15
21
"customizations" : {
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ # shellcheck source=/dev/null
6
+ # file not accessible until being built
7
+ source /usr/local/bin/devcontainer-utils
8
+
9
+ get_system_architecture
10
+
11
+ GITHUB_REPOSITORY=" terraform-linters/tflint"
12
+ VERSION=" ${TFLINTVERSION:- " latest" } "
13
+
14
+ if [[ " ${VERSION} " == " latest" ]]; then
15
+ get_github_latest_tag " ${GITHUB_REPOSITORY} "
16
+ VERSION=" ${GITHUB_LATEST_TAG} "
17
+ VERSION_STRIP_V=" ${GITHUB_LATEST_TAG_STRIP_V} "
18
+ else
19
+ # shellcheck disable=SC2034
20
+ VERSION_STRIP_V=" ${VERSION# v} "
21
+ fi
22
+
23
+ curl --fail-with-body --location " https://github.com/terraform-linters/tflint/releases/download/${VERSION} /tflint_linux_${ARCHITECTURE} .zip" \
24
+ --output " tflint_${VERSION_STRIP_V} _linux_${ARCHITECTURE} .zip"
25
+
26
+ unzip " tflint_${VERSION_STRIP_V} _linux_${ARCHITECTURE} .zip"
27
+
28
+ install --owner=vscode --group=vscode --mode=775 tflint /usr/local/bin/tflint
29
+
30
+ rm --recursive --force tflint " tflint_${VERSION_STRIP_V} _linux_${ARCHITECTURE} .zip"
Original file line number Diff line number Diff line change @@ -6,3 +6,6 @@ source /usr/local/bin/devcontainer-utils
6
6
7
7
logger " info" " Installing Terraform CLI (version: ${TERRAFORMCLIVERSION} )"
8
8
bash " $( dirname " ${0} " ) " /install-terraform-cli.sh
9
+
10
+ logger " info" " Installing tflint (version: ${TFLINTVERSION} )"
11
+ bash " $( dirname " ${0} " ) " /install-tflint.sh
Original file line number Diff line number Diff line change @@ -9,4 +9,6 @@ source dev-container-features-test-lib
9
9
check " terraform version" terraform version
10
10
check " terraform featurerc existence" stat /home/vscode/.devcontainer/featurerc.d/terraform-cli.sh
11
11
12
+ check " tflint version" tflint --version
13
+
12
14
reportResults
You can’t perform that action at this time.
0 commit comments