Skip to content

Commit f78188c

Browse files
CCM-6104 consolidating repo changes for AMET structure back to template
1 parent fac6cf9 commit f78188c

35 files changed

+108
-407
lines changed

β€Ž.tool-versionsβ€Ž

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# This file is for you! Please, updated to the versions agreed by your team.
2-
3-
terraform 1.9.1
4-
pre-commit 3.6.0
5-
nodejs 18.18.2
1+
act 0.2.64
62
gitleaks 8.18.4
3+
pre-commit 3.6.0
4+
terraform 1.9.2
5+
vale 3.6.0
76
tfsec 1.28.10
87

98
# ==============================================================================
@@ -18,7 +17,7 @@ tfsec 1.28.10
1817
# docker/ghcr.io/nhs-england-tools/github-runner-image 20230909-321fd1e-rt@sha256:ce4fd6035dc450a50d3cbafb4986d60e77cb49a71ab60a053bb1b9518139a646 # SEE: https://github.com/nhs-england-tools/github-runner-image/pkgs/container/github-runner-image
1918
# docker/hadolint/hadolint 2.12.0-alpine@sha256:7dba9a9f1a0350f6d021fb2f6f88900998a4fb0aaf8e4330aa8c38544f04db42 # SEE: https://hub.docker.com/r/hadolint/hadolint/tags
2019
# docker/hashicorp/terraform 1.5.6@sha256:180a7efa983386a27b43657ed610e9deed9e6c3848d54f9ea9b6cb8a5c8c25f5 # SEE: https://hub.docker.com/r/hashicorp/terraform/tags
21-
# docker/jdkato/vale v2.29.7@sha256:5ccfac574231b006284513ac3e4e9f38833989d83f2a68db149932c09de85149 # SEE: https://hub.docker.com/r/jdkato/vale/tags
20+
# docker/jdkato/vale v3.6.0@sha256:0ef22c8d537f079633cfff69fc46f69a2196072f69cab1ab232e8a79a388e425 # SEE: https://hub.docker.com/r/jdkato/vale/tags
2221
# docker/koalaman/shellcheck latest@sha256:e40388688bae0fcffdddb7e4dea49b900c18933b452add0930654b2dea3e7d5c # SEE: https://hub.docker.com/r/koalaman/shellcheck/tags
2322
# docker/mstruebing/editorconfig-checker 2.7.1@sha256:dd3ca9ea50ef4518efe9be018d669ef9cf937f6bb5cfe2ef84ff2a620b5ddc24 # SEE: https://hub.docker.com/r/mstruebing/editorconfig-checker/tags
2423
# docker/sonarsource/sonar-scanner-cli 5.0.1@sha256:494ecc3b5b1ee1625bd377b3905c4284e4f0cc155cff397805a244dee1c7d575 # SEE: https://hub.docker.com/r/sonarsource/sonar-scanner-cli/tags

β€Žinfrastructure/environments/dev/.gitkeepβ€Ž

Whitespace-only changes.

β€Žinfrastructure/terraform/bin/terraform.shβ€Ž

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
##
99
# Set Script Version
1010
##
11-
readonly script_ver="1.8.0";
11+
readonly script_ver="1.8.1";
1212

1313
##
1414
# Standardised failure function
@@ -399,13 +399,16 @@ fi;
399399
pushd "${component_path}";
400400
readonly component_name=$(basename ${component_path});
401401

402-
# Check for presence of tfenv (https://github.com/kamatama41/tfenv)
403-
# and a .terraform-version file. If both present, ensure required
404-
# version of terraform for this component is installed automagically.
405-
tfenv_bin="$(which tfenv 2>/dev/null)";
406-
if [[ -n "${tfenv_bin}" && -x "${tfenv_bin}" && -f .terraform-version ]]; then
407-
${tfenv_bin} install;
408-
fi;
402+
# install terraform
403+
# verify terraform version matches .tool-versions
404+
echo ${PWD}
405+
tool_version=$(grep "terraform " .tool-versions | cut -d ' ' -f 2)
406+
asdf plugin-add terraform && asdf install terraform "${tool_version}"
407+
current_version=$(terraform --version | head -n 1 | cut -d 'v' -f 2)
408+
409+
if [ -z "${current_version}" ] || [ "${current_version}" != "${tool_version}" ]; then
410+
error_and_die "Terraform version mismatch. Expected: ${tool_version}, Actual: ${current_version}"
411+
fi
409412

410413
# Regardless of bootstrapping or not, we'll be using this string.
411414
# If bootstrapping, we will fill it with variables,

β€Žinfrastructure/terraform/bootstrap/.terraform-versionβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€Žinfrastructure/terraform/bootstrap/data_iam_policy_document_bucket.tfβ€Ž

Lines changed: 0 additions & 68 deletions
This file was deleted.

β€Žinfrastructure/terraform/bootstrap/data_iam_policy_document_kms_key_s3.tfβ€Ž

Lines changed: 0 additions & 46 deletions
This file was deleted.

β€Žinfrastructure/terraform/bootstrap/dynamodb_table.tfβ€Ž

Lines changed: 0 additions & 26 deletions
This file was deleted.

β€Žinfrastructure/terraform/bootstrap/kms_key_s3.tfβ€Ž

Lines changed: 0 additions & 16 deletions
This file was deleted.

β€Žinfrastructure/terraform/bootstrap/locals.tfβ€Ž

Lines changed: 0 additions & 13 deletions
This file was deleted.

β€Žinfrastructure/terraform/bootstrap/outputs.tfβ€Ž

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
Β (0)