Skip to content

Commit cf666b6

Browse files
authored
Extend GPG workaround to Ubuntu 26.04 (resolute) and add tests
1 parent b6a0953 commit cf666b6

4 files changed

Lines changed: 50 additions & 3 deletions

File tree

‎src/terraform/install.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ INSTALL_SENTINEL=${INSTALLSENTINEL:-false}
1919
INSTALL_TFSEC=${INSTALLTFSEC:-false}
2020
INSTALL_TERRAFORM_DOCS=${INSTALLTERRAFORMDOCS:-false}
2121
CUSTOM_DOWNLOAD_SERVER="${CUSTOMDOWNLOADSERVER:-""}"
22-
# This is because ubuntu noble and debian trixie don't support the old format of GPG keys and validation
23-
NEW_GPG_CODENAMES="trixie noble"
22+
# This is because ubuntu noble, ubuntu resolute and debian trixie don't support the old format of GPG keys and validation
23+
NEW_GPG_CODENAMES="trixie noble resolute"
2424

2525
TERRAFORM_SHA256="${TERRAFORM_SHA256:-"automatic"}"
2626
TFLINT_SHA256="${TFLINT_SHA256:-"automatic"}"
@@ -52,7 +52,7 @@ if [ "$(id -u)" -ne 0 ]; then
5252
exit 1
5353
fi
5454

55-
# Detect Ubuntu Noble or Debian Trixie and use new repo setup, else use legacy GPG logic
55+
# Detect Ubuntu Noble, Ubuntu Resolute or Debian Trixie and use new repo setup, else use legacy GPG logic
5656
IS_GPG_NEW=0
5757
. /etc/os-release
5858
if [[ "${NEW_GPG_CODENAMES}" == *"${VERSION_CODENAME}"* ]]; then
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Import test library
6+
source dev-container-features-test-lib
7+
8+
# Check if terraform was installed correctly
9+
check "terraform installed" terraform --version
10+
11+
check "tflint" tflint --version
12+
13+
# Report results
14+
reportResults
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Import test library for `check` command
6+
source dev-container-features-test-lib
7+
8+
# Check if terraform was installed correctly
9+
check "terraform installed" terraform --version
10+
11+
check "tflint" tflint --version
12+
13+
# Sentinel specific tests
14+
check "sentinel" sentinel --version
15+
16+
# Report result
17+
reportResults

‎test/terraform/scenarios.json‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,22 @@
3131
}
3232
}
3333
},
34+
"install_in_ubuntu_resolute": {
35+
"image": "ubuntu:resolute",
36+
"features": {
37+
"terraform": {
38+
"version": "latest"
39+
}
40+
}
41+
},
42+
"install_in_ubuntu_resolute_sentinel": {
43+
"image": "ubuntu:resolute",
44+
"features": {
45+
"terraform": {
46+
"installSentinel": true
47+
}
48+
}
49+
},
3450
"install_sentinel": {
3551
"image": "mcr.microsoft.com/devcontainers/base:jammy",
3652
"features": {

0 commit comments

Comments
 (0)